osmcode / osmium-tool

Command line tool for working with OpenStreetMap data based on the Osmium library.
https://osmcode.org/osmium-tool/
GNU General Public License v3.0
483 stars 104 forks source link

Alaska state boundary extract with bbox missing ways on Western Hemishpere #230

Closed watbywbarif closed 2 years ago

watbywbarif commented 2 years ago

Get Alaska relation from Planet OSM

osmium getid planet-latest.osm.pbf r1116270 -r -o alaska-from-planet.pbf
./pbflint.linux.bin alaska-from-planet.pbf

ErrorCount: 0
WarningCount: 0
TotalNodes: 40470
TotalWays: 128
TotalRelations: 1

But when I cut this relation to take only western hemisphere I get missing ways (also not drawing correctly in QGis)

osmium extract --bbox -180,-90,0,90 alaska-from-planet.pbf -o alaska-from-planet-west.pbf
./pbflint.linux.bin alaska-from-planet-west.pbf

error: relation 1116270 missing member way 46113982
error: relation 1116270 missing member way 42394837
error: relation 1116270 missing member way 42394795
error: relation 1116270 missing member way 42394788
error: relation 1116270 missing member way 42394794
error: relation 1116270 missing member way 42394790
ErrorCount: 6
WarningCount: 0
TotalNodes: 36590
TotalWays: 122
TotalRelations: 1

Tried with: ae98be7 - Fix point in polygon check 537ca6d - Use pointers as iterators (because we can) 2517ca0 - Release v1.13.1 Missing ways with all versions above.

joto commented 2 years ago

Those ways are not in your bbox, so they are not in the output. That is how extract is supposed to work. If that's not what you want, see the "Smart" strategy in the man page and, possibly, further options you can set for the smart strategy.

watbywbarif commented 2 years ago

Oh, missed that options. Sorry