Exclude geographic extent of an OSM file

by Harry Wilson   Last Updated June 12, 2019 07:22 AM - source

Osmium and Osmosis command tools have the capability of extracting a geographic extent from an OSM file.

osmosis 
--read-xml test.osm --tee 1
--bounding-box left=15 top=46 --write-xml extract_test.osm

osmium extract -p city.geojson test.pbf -o extract_test.pbf

What I need is to extract region from an OSM file like a city and after some edits, merge it with the OSM file with the hole (excluded the city region). How can I exclude or clip a geographic extent from original file?



Related Questions



How to merge OSM files with same ID?

Updated July 26, 2017 19:22 PM


How to fix referential integrity in osmium

Updated May 20, 2017 22:22 PM

Retrieve OSM changeset information (pyosmium)

Updated December 10, 2018 17:22 PM