This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

osmosis - extract via bbox or poly - which is faster?

1

Hello -

I am extracting continent data from planet.osm.pbf (for further processing) and am wondering which is faster - using bounding boxes or .poly files. And is there a subsequent extract performance impact?

While I can run a series of tests if someone knows the answer it would be more time efficient. I also understand "history splitter" is faster but compiling is a bit beyond my current skill set. Or future :)

Thanks, pitney

asked 11 Dec '14, 15:59

pitney's gravatar image

pitney
44557
accept rate: 0%


2 Answers:

2

Checking if a point is inside a polygon is usually (much) more expensive than a simple bbox check, i.e. bbox will be faster in general. However, if you plan to use poly files, be sure to use as few points as possible, while still retaining close enough resemblance to the original geometry. That really cuts down the overall processing time.

Maybe you want to get in touch with Frederik Ramm on this or use some of the existing Geofabrik poly files.

Btw: what do you mean with 'history splitter' is faster? Planet files don't include any version history so this is not really relevant.

answered 13 Dec '14, 07:55

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 13 Dec '14, 09:33

mmd, thank you once again.
I am using Geofabrik's .poly files, I did not mention it because I am try not to write essays here. "history splitter" is https://github.com/MaZderMind/osm-history-splitter which I have read is faster. and I just! discovered that the "check mark" let's one accept an answer. wwk? pitney

(13 Dec '14, 14:50) pitney

0

I ran tests contrasting .poly files from geofabrik and bounding boxes

poly = 5 hours

bbox = 4 hours

(16 gb ram, dual quad cores, --tee=6, --workers=7)

pitney

answered 19 Jan '15, 20:31

pitney's gravatar image

pitney
44557
accept rate: 0%

Source code available on GitHub .