OSM bounding box query -- API docs
Last active
December 16, 2015 22:48
-
-
Save pbogden/c2625768c1938715ffb4 to your computer and use it in GitHub Desktop.
osm vectors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data | |
| tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SOURCE_DATA = district-of-columbia-latest.shp.zip | |
| SOURCE_SITE = http://download.geofabrik.de/north-america/us/ | |
| all: dc.json | |
| .PHONY: clean all | |
| # Download the data (zipped shapefiles -- 57 MB) | |
| data/$(SOURCE_DATA): | |
| curl -LO $(SOURCE_SITE)$(SOURCE_DATA) | |
| mkdir data | |
| mv $(SOURCE_DATA) data | |
| # Convert shapefiles to topojson | |
| # --no-quantization 87 MB JSON file without trying to save space | |
| # 14 MB with default setting | |
| dc.json: data/$(SOURCE_DATA) | |
| @echo "making" $@ | |
| mkdir tmp | |
| cp data/*.zip tmp | |
| unzip data/$(SOURCE_DATA) -d tmp | |
| topojson --no-quantization -p -o $@ -- tmp/roads.shp | |
| # topojson --no-quantization -p -o $@ -- `find tmp/*.shp` | |
| clean: | |
| rm -r tmp |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment