I am having trouble displaying country borders properly in GeoServer, as you can see from the link below (map of Italy).


The problem occurs with country boundaries which have very sharp edges (I assume), e.g. the shape of Albania shows correctly:


I obtained the ESRI shapefile from naturalearthdata.com and used ogr2ogr to transfer them in a MySQL database, which GeoServer uses as a datasource and created a layer in it.

Anyone has a lead? Either I missed something in the layer configuration (the projections are alright though, as the shapes are positioned correctly in the map), or ogr2ogr messed up the data during the conversion.

  • It looks like either ogr is having issues translating the complex multipolygon into mysql, or mysql is having trouble storing it. Depending on the size of the polygon, you may have hit the packet limit defined by max_allowed_packet for your database when loading the polygon, and part of it got clipped out, which jumbled the polygons of the multipolyon.
    – DPierce
    Dec 19, 2013 at 18:31

1 Answer 1


There might be two possible scenarios: either you tried to change the projection force fully without applying necessay transformation while using the ogr2ogr or you could have projected your data from different units and different projection into your current system while publishing your layer via geoserver. Way out: try to check the native and declared srs in geoserver layer page for your specific layer and make sure you got the correct ones for both. Also using SRS handling as reproject native to declared and then computing both the bounding boxes values using geoserver might be a way out.

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.