mapsme / osmctools

OpenStreetMap processing tools.
Other
18 stars 27 forks source link

Clipping by Polygon may leave geometries outside polygon #7

Open craig-o opened 4 years ago

craig-o commented 4 years ago
  1. Download the following file

https://download.geofabrik.de/russia/northwestern-fed-district-latest.osm.pbf

  1. Clip by polygon

osmconvert -v ./northwestern-fed-district-latest.osm.pbf -B=Russia_Nenets_Autonomous_Okrug.poly --complete-ways -o=nenetsconv.osm.pbf

  1. The output pbf contains geometries outside the original polygon, see the highlighted geometries in yellow.

nenets_poly_results nenetsconv.zip Russia_Nenets_Autonomous_Okrug.txt

osmconvert --help osmconvert 0.8.7

F-I-D-O commented 3 years ago

I can confirm that geometries outside (like completely away, not the ones crossing the border) also happens when specifying the rectangle with the -b option.

biodranik commented 3 years ago

Are these geometries a part of any relation inside polygon?