1

My target is to have the whole planet to be available in the map client[leaflet.js/openlayers.js] but only a specific country loaded with roads etc.

I have followed the steps below to setup my Geoserver (2.7.1) with OpenStreetMaps:

  1. Downloaded the shape files for a country [e.g. http://download.geofabrik.de/europe/czech-republic-latest.shp.zip] and uploaded them to Geoserver.
  2. Downloaded the land polygons [http://data.openstreetmapdata.com/land-polygons-split-4326.zip] and uploaded them to GeoServer.
  3. Downloaded the mapnik styles[http://svn.openstreetmap.org/applications/rendering/mapnik], converted them with mapnik2geotools and uploaded them with it using the rest services option.

When visiting the Layer Preview and select the land-polygons layer it displays fine with zooming going all the way. When I assign the world style to this layer the zooming is not quite going all the way down and after some zooming point the map is blank.

On top of that, when I add the road layer and assign the mapnik converted road style as its default nothing gets rendered. The layer and the whole map is just blank. The documentation says that this is most probably because there are semantic errors in the styles.

What am I doing wrong? Can anyone let me know of any current OSM Geoserver ready styles I could use? Which one of the two (Mercado or 4326) projections would you recommend? Should I just go for another map server which is straight away compatible with OpenStreeMap data and mapnik styles?

  • Not answering the question, but you almost certainly don't want to use shapefiles for the world. Consider using a database backend: postgis. – BradHards Aug 4 '15 at 9:40
  • The Mapnik styles rely on the schemata and attributes of the tables which are created with osm2pgsql utility from the native OSM data in XML or PBF format. Otherwise shapefiles for the Czech republic only would not be a bad option @BradHards. – user30184 Aug 4 '15 at 10:06
  • I want the maps to look as close to OpenStreetMap but thus far I am failing big time. Any thorough steps to do it? I tried postgis with the country I wanted but now I have less shapes. The land_polygons layer still does not zoom properly if I use the "world" style causing the map to become blank after some point. – DaTroop Aug 4 '15 at 12:07
  • OK I fixed the zooming problem by removing the MaxScaleDenominator elements from the styles but still roads are missing, road labels are missing etc – DaTroop Aug 4 '15 at 13:16
  • I went for the tile_mod (mapnik) and PostGIS and everything seems to work fine and for now it is adequate for me – DaTroop Aug 7 '15 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.