1 KiB
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
../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