Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am wondering why my roads layer keeps appearing as points when previewed inside GeoServer - layer preview using both the OpenLayers and GeoExplorer options. The data are imported from PostGIS.

I cant figure out where the problem might be originating from as i am also new to both PostGIS and GeoServer. In PostGIS, i have added a Geometry table using:

CREATE TABLE geometries (name varchar, geom geometry);

INSERT INTO geometries VALUES
  ('Point', 'POINT(0 0)'),
  ('Linestring', 'LINESTRING(0 0, 1 1, 2 1, 2 2)'),
  ('Polygon', 'POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'),
  ('PolygonWithHole', 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(1 1, 1 2, 2 2, 2 1, 1 1))'),
  ('Collection', 'GEOMETRYCOLLECTION(POINT(2 0),POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)))');

SELECT Populate_Geometry_Columns();

SELECT name, ST_AsText(geom) FROM geometries;

However the geometry column in my tables is named "wkb_geometry". Could this be an error? Please help!

Thanks in advance

Barbara

share|improve this question

1 Answer 1

up vote 3 down vote accepted

This is a bit confusing as the inset you show is clearly not a roads layer but a test geometries table. If you are really trying to display that layer via GeoServer then you will need to read up on mixed geometry SLD files.

However, I suspect that what is actually happening is that you have some other table with lines in it to represent roads and you have applied the default point style to it. So go to the publish tab of the layer's view in GeoServer and change the style to line.

share|improve this answer
    
Hi Iant, thanks i have now fixed that. Now i have another problem. What i want to do is publish a set of data from my PostGIS table. Firstly, i created a workspace, then a data store and specified the connection parameter etc. I have published the data layers. To preview all my data layers in OpenLayers works fine however i cant do the same in GeoExplorer. Even when i accessed geoexplorer seperately to try and see if i can add layers, my layers were not showing in the Local GeoServer list of layers. I am now wondering again, what might have gone wrong. Im using the OpenGeo Suite. Please help. –  Barbara Nov 14 '12 at 12:49
    
The best plan would be to accept this answer and ask a new question, people are unlikely to spot a question down here and I don't know much about GeoExplorer. –  iant Nov 14 '12 at 12:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.