This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
osm_map_processing/custom_polys_and_extracts.md

23 lines
1 KiB
Markdown
Raw Normal View History

# Creating custom polys (some rough notes)
Head to https://www.openstreetmap.org/ and find the relation id of the boundry you want as a poly
Grab an appropriate pbf/osm.bz2 from http://download.geofabrik.de/ that INCLUDES the region you want to extract if not available
Head to http://polygons.openstreetmap.fr/index.py and enter relation id
Extract the region using osmosis
https://wiki.openstreetmap.org/wiki/Osmosis/Examples
http://blog.geofabrik.de/?p=75
../bin/osmosis/bin/osmosis --read-pbf central-america-latest.osm.pbf \
--tee 3 \
--bp file=costa_rica.poly --write-pbf costa-rica-latest.osm.pbf \
--bp file=nicaragua.poly --write-pbf nicaragua-latest.osm.pbf \
--bp file=panama.poly --write-pbf panama-latest.osm.pbf
2018-03-07 16:53:29 +00:00
../bin/osmosis/bin/osmosis --read-pbf australia-latest.osm.pbf \
--tee 3 \
--bp file=new-south-wales.poly --write-pbf new-south-wales.osm.pbf \
--bp file=queensland.poly --write-pbf queensland-latest.osm.pbf \
--bp file=victoria.poly --write-pbf victoria-latest.osm.pbf