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 can't 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);
  ('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!

1 Answer 1


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.

  • 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, 2012 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.
    – Ian Turton
    Nov 14, 2012 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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