18 lines
766 B
Markdown
18 lines
766 B
Markdown
|
# 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
|
||
|
|