2018-03-07 00:19:33 +00:00
|
|
|
# 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
|
2018-03-24 23:01:24 +00:00
|
|
|
|
|
|
|
../bin/osmosis/bin/osmosis --read-pbf us-midwest-latest.osm.pbf \
|
|
|
|
--tee 15 \
|
|
|
|
--bp file=marquette-county.poly --write-pbf marquette-county-latest.osm.pbf \
|
|
|
|
--bp file=keweenaw-county.poly --write-pbf keweenaw-county-latest.osm.pbf \
|
|
|
|
--bp file=houghton-county.poly --write-pbf houghton-county-latest.osm.pbf \
|
|
|
|
--bp file=ontonagon-county.poly --write-pbf ontonagon-county-latest.osm.pbf \
|
|
|
|
--bp file=gogebic-county.poly --write-pbf gogebic-county-latest.osm.pbf \
|
|
|
|
--bp file=baraga-county.poly --write-pbf baraga-county-latest.osm.pbf \
|
|
|
|
--bp file=iron-county.poly --write-pbf iron-county-latest.osm.pbf \
|
|
|
|
--bp file=dickinson-county.poly --write-pbf dickinson-county-latest.osm.pbf \
|
|
|
|
--bp file=alger-county.poly --write-pbf alger-county-latest.osm.pbf \
|
|
|
|
--bp file=delta-county.poly --write-pbf delta-county-latest.osm.pbf \
|
|
|
|
--bp file=luce-county.poly --write-pbf luce-county-latest.osm.pbf \
|
|
|
|
--bp file=chippewa-county.poly --write-pbf chippewa-county-latest.osm.pbf \
|
|
|
|
--bp file=menominee-county.poly --write-pbf menominee-county-latest.osm.pbf \
|
|
|
|
--bp file=schoolcraft-county.poly --write-pbf schoolcraft-county-latest.osm.pbf \
|
|
|
|
--bp file=mackinac-county.poly --write-pbf mackinac-county-latest.osm.pbf
|
|
|
|
|