6

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

http://trideg.server.de/tridec/wms?service=WMS&version=1.1.0&request=GetMap&layers=tridec:static_hasc_regions&styles=&bbox=489196.9,4109254.4,2426416.9,5987770.7&width=775&height=330&srs=EPSG:900913&format=application/openlayers&viewparams=codes%3A%27IT%27

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

http://trideg.server.de/tridec/wms?service=WMS&version=1.1.0&request=GetMap&layers=tridec:static_hasc_regions&styles=&bbox=489196.9,4109254.4,2426416.9,5987770.7&width=775&height=330&srs=EPSG:900913&format=application/openlayers&viewparams=codes%3A%27AL%27

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 '13 at 18:31
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, privacy policy and cookie policy

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