Friday 24 April 2015

openstreetmap - Creating smaller OSM with only basic zoom levels data from larger OSM file?


From a large .osm/.o5m file (for India), I only want to extract the data that would actually show up when one is looking from zoom levels 1/0 through 8 (which is quite zoomed out.. only major cities, highways, geographical regions and coastlines). See screenshot, of a much smaller area loaded in Maperitive, seen at zoom level 8:



sample zoom level 8 view


The extracted .osm would then be much smaller in size, and I would be able to load it on Maperitive/other for just basic-zoom-levels rendering. I'm working with India's .osm downloaded from geofabrik.de. The .osm (with author and version info dropped) currently weighs over 3GBs.. impossible to load on my end, and we don't have access to any super-ish computers. Basically I want to get rid of all data that wouldn't show up at zoom level 8 or higher anyway. I'm working with osmconvert / osmfilter / maperitive, on Windows. Would prefer working with these simple portable apps and not get into postGIS databases etc, in the interest of making this doable for more people.


My understanding is that the data in the OSM file isn't tagged by zoom level; that there are algorithms and map styles that decide what gets displayed and what doesn't. So, it would be great if I could get a list of objects to --keep using osmfilter or similar. I don't want to do any major customization to the regular OSM rendering, and don't need to religiously stick to it either. Example, from the wiki page:


osmfilter norway.osm --keep="highway=primary =secondary waterway=river" >streets.osm

What source should I be looking up to get this --keep list?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...