Geographic Information Systems Asked on December 13, 2020
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?
GeoJSON polygons are allowed to have holes, and Osmium does in fact support this.
So you could construct a polygon where ...
Running osmium extract
with that polygon as the -p
parameter would remove data inside the inner ring and yield the desired result.
Answered by Tordanik on December 13, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP