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!

3 Answers 3


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.

  • Thanks for answering. For the performance issues I'll probably go the pre-render way on a fast machine.
    – David
    Commented Jul 21, 2014 at 8:27
  • Providing the tiles without TileCache works without problems. Had to use file:///C:/osm_tiles/{z}/{x}/{y}.png
    – David
    Commented Jul 21, 2014 at 14:01

For the satellite tiles, you could render them yourself using Mapnik. Landsat and NAIP are two sources of free satellite raster data.

edit: I've also just come across a growing dataset (also free) of High Resolution Orthoimagery, which I've never used, but is much higher detail than the other two sources.

  • This looks promising! Thanks for your answer. I'll play around with it.
    – David
    Commented Jul 21, 2014 at 8:28

Depending on how confident you are with technical setups, rather than running local GeoServers, you could use something like TileMill to generate MBTiles files of all your images, or just the images using Invar. This can then be show by simple python code like TileStache. This would be a much lighter weight setup.

  • Had a look on TileStache. Seems to be very promising. In fact I rendered tiles for the zoom levels 0 - 18 for a small space in Germany. It's already 23 GB on disk. The MBTiles is more than half the size of it!
    – David
    Commented Aug 6, 2014 at 12:28

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.