4

I need to create about a 9-level deep SLIPPY map of the world from OSM data (for offline use). So I cannot use the MapQuest, CloudMade, etc. servers). The projection must be EPSG4326 (LL84) which is another reason I cannot use them. The viewer is Leaflet which I have working fine with EPSG4326 tiles (currently I am diced the NASA Blue Marble to 9 levels).

I like the look of the mapquest tiles the best: http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg

but I could deal with others. The main reason I like MapQuest is the worldwide english labeling (with foreign subtitles) and the look of the topographic terrain (useful in regions with no roads).

Tools that I have at my disposal include FME Professional (my favorite), QGIS, PostGIS 2.0, and GDAL. I am working on a large Windows 7SP1 box.

I cannot use cloud services like like mentioned in the following article at OSM.org:

http://wiki.openstreetmap.org/wiki/Deploying_your_own_Slippy_Map

  • See Switch2Osm.org for more information on serving your own tiles.
  • Tiledrawer is a free, quick-start, out-of-the-box renderer and server using the standard OSM toolchain for Amazon EC2, other virtual servers, and fresh installs of Ubuntu on any hardware.

3 Answers 3

1

I would suggest you to use mapnik (uses style XML) to pre-render map tiles from osm data stored in postreSQL(postgis) using gdal and these rendered tiles can be accessed using openlayers.

If you need details I can help you out to configure all :)

6
  • Delivery will be to leaflet, not openlayers, but yes. That is one path I am considering. I have seen some outlines of the Mapnik (postgresql/postgis) process at switch2osm.org/serving-tiles/manually-building-a-tile-server but that is for Linux, and we are a windows shop. I am also guessing that we should reserve a large block of developer time, since I have gut feeling that each zoom level has to have a filtered level of detail (from the OSM XML data).
    – Dr.YSG
    Oct 4, 2013 at 15:11
  • Leaflet and openlayers both are client side libraries that's not an issue so you can any of them. Secondly I have successfully configured above required softwares on both windows and Linux.just let me know how can I help you. Oct 5, 2013 at 8:28
  • Do you want me to send you instructions or you wanna have skype con if you like? Oct 6, 2013 at 12:50
  • We cannot sub-contract this work, so I cannot offer $, but if you know of a blog or article that outlines the process of designing the styles with mapnik for each level, and tips about dealing with dicing the larger zoom levels, that would be the best.
    – Dr.YSG
    Oct 6, 2013 at 15:56
  • Corporate firewalls keep us from Skype, but I can take email or pointers to blogs, etc.
    – Dr.YSG
    Oct 7, 2013 at 16:24
1

All I was looking for was a pointer to some tutorials. Not someone looking for contract work.

I found a couple of very good sites:

First: Boston GIS has a 3 part series on this, a little dated, but they provide updates in the comments:

http://www.bostongis.com/PrinterFriendly.aspx?content_name=loading_osm_postgis

Also: there is a lot at the MapNik site itself:

https://github.com/mapnik/mapnik/wiki/LearningMapnik

They also have tutorials:

https://github.com/mapnik/mapnik/wiki/MapnikTutorials

0

Just till 9, right? Use Maperitive : http://maperitive.net

Lazy caching:

  1. Clear out the current map by hitting Ctrl+N, and add Tools > Add Web Map > MapQuest Open Aerial (I'm guessing that's the one you want)
  2. Browse through all the places you want tiles of, at the zoom levels you want.
  3. Type zoom 2,zoom 3 etc in the command line to be sure you're at the right level.
  4. Once the tour is done, go to the Maperitive folder > Cache > WebTiles >...
  5. You'll see folders 1,2,3 etc. That's your tiles. You've downloaded them! (without scraping.. yay!) Copy it all over to your tiles folder.
  6. Webpage: Grab a basic leaflet example if you don't have one yet.. save the .js and .css to your folder and change their paths so this thing is offline
  7. Change the map tiles URL to a local one, pointing to your tiles. Like: tiles/{z}/{x}/{y}.png (cross-check the file extension)

There is an automated way of doing this, but I would strictly advise against it. Anyways, the manual browsing is a much more passive, benign way, and you'll only be making use of data that Mapquest has already sent forth.. no repetition of the same download actions, no extra load on their servers. Plus, several regions, like the middle of the ocean, don't require zooming even till 9. By not browsing there in Maperitive, you avoid downloading those unnecessary tiles, and still get the required detail at the locations you want. You want it till level 9 zoom, right? Should be done in an hour or so.

Tip: to automate the manual browsing, get Autohotkey or similar keystroke automation tool and just set it to press the left key every half second or so some n number of times. The servers don't mind us taking our own sweet time to download the tiles at just a few tiles every few seconds like normal users do.. their problem is with the high-intensity scraping so let's work around that.

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.