I'd like to extract small xml files of tiled osm data from a pbf file. These xml files should contain data square map boxes. I'd like to have one xml file for each tile that is touched by the original pbf file. I used osmosis to extract one tile, which took 10 minutes for a pbf file of 2GB. This is probably due to the size of the pbf file (and IO speed), and not dependent on the size of my bounding box. Is there a tool that lets me extract lots of bounding boxes at once? asked 10 Apr '15, 17:51 Marian |
If you want to create a huge number of extracts then perhaps installing a local Overpass database and extracting from there could be the fastest way. See http://overpass-api.de/no_frills.html for instructions. answered 19 Apr '15, 18:47 Frederik Ramm ♦ Why do you recommend creating a local overpass database over using an existing overpass service? Even in production, 10000 requests per day is way beyond what I need. Is the local db faster?
(10 Nov '15, 23:21)
Marian
If you're just doing this once for 5 or 10 bounding boxes then I guess it's ok. Else you come close to abusing the existing Overpass server - the local db may not be faster but it sure is fairer!
(11 Nov '15, 01:26)
Frederik Ramm ♦
The wiki page says 10.000 requests are ok. If 10 already is abuse, I'll sure set up my own. https://wiki.openstreetmap.org/wiki/Overpass_API
(11 Nov '15, 06:30)
Marian
|
You can try osmconvert ... it has several clipping features. Read the instructions in wiki page carefully. answered 10 Apr '15, 19:26 stephan75 Can you provide an example of how to extract two bboxes from one pbf file using osmconvert?
(10 Apr '15, 19:54)
Marian
Did you try the clear example at http://wiki.openstreetmap.org/wiki/Osmconvert#Clipping_based_on_Longitude_and_Latitude If you want two bboxes extracted, you should call this command twice with diferent parameters ... Success?
(11 Apr '15, 06:48)
stephan75
I have to do this more than 100k times. I was wondering if there is a more efficient way than parsing the entire pbf file each time.
(12 Apr '15, 23:13)
Marian
|
Yes, the OSM History Splitter which processes history files as well as normal PBFs. answered 10 Apr '15, 18:29 Frederik Ramm ♦ It doesn't compile on my ubuntu machine... (fails to find
(10 Apr '15, 21:57)
Marian
I got it to run but it crashes if there are more than 30 bounding boxes in the config file.
(16 Apr '15, 13:25)
Marian
Turns out RAM usage grows quickly with the amount of bounding boxes so only a few bboxes can be extracted at a time.
(18 Apr '15, 12:41)
Marian
1
You might want to try the
(19 Apr '15, 18:46)
Frederik Ramm ♦
|