[GIS] Offline Map Service with Mapnik and Leaflet

leafletmapnikofflineopenstreetmappostgis

I'm relatively new to GIS, so I hope my asking doesn't appear to be ignorant in any way.

I currently work on an offline map service solution for usage in areas without internet connection. For that purpose I want to download the data from a provider (i.e. geofabrik.de), load it into a PostGIS enabled database by using osm2pgsql, process the data with Mapnik and store the rendered tiles on the local machine. The map data doesn't need to be up-to-date but should be able to get updated once or twice a year.

From there, Leaflet will be used to display the rendered tiles and also satellite tiles if possible, as a slippy map. The map user should also be able to edit data on the map and to save them as vector layer to the database.

enter image description here

I already did something similar by using Geoserver, GeoWebCache and OpenLayers but I'd like to have at least two approaches for comparison.

My questions are:

  • Where is the difference in using Mapnik or Geoserver? This may seem to be a redundant question but I couldn't answer it – so far.
  • Where do I get the satellite tiles? I read something about OSM providing servers for them but only give out higher capacity downloads to chosen projects.
  • Are there any performance issues I should look out for? The provided systems are old Panasonic Toughbooks with limited CPU and RAM. I already tried the Geoserver way on them. It worked, since there is no real-time rendering. But maybe I'm overlooking something.
  • Any flaws with the approach?

Thanks for investing time in this!

Best Answer

Your approach looks ok to me. On my local system, I skipped the TileCache part. Mapnik fills the folders in the way Openlayers reads them from disk using file:///... I don't know if leaflet can do it the same way.

For the satellite tiles: You have no chance to get them legally. Google and bing do not like storing their tiles locally. If you have mapnik-rendered tiles form OSM, they will be not transparent, so you will not see the satellite picture underneath.

If performance is an issue, you can render on a faster machine, and copy the tiles to slower ones for the end user.

I have not tried storing data back into the database.