2025-02-10 19:46:31 -06:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#! nix-shell -i bash --pure
|
2025-02-11 00:14:58 -06:00
|
|
|
#! nix-shell -p bash curl cacert jq
|
2025-02-10 19:46:31 -06:00
|
|
|
|
|
|
|
# TODO: process out extraneous data
|
|
|
|
|
2025-02-11 00:14:58 -06:00
|
|
|
# curl -s https://overpass-api.de/api/interpreter --data-urlencode 'data=[out:json];area[name="Northern Arizona University"]->.searchArea;(way["highway"="footway"](area.searchArea);way["highway"="cycleway"](area.searchArea););out geom;' -o data/sidewalks.json
|
|
|
|
curl -s "https://overpass-api.de/api/interpreter" --data '
|
|
|
|
[out:json];
|
|
|
|
area[name="Northern Arizona University"]->.searchArea;
|
|
|
|
(
|
|
|
|
way["highway"="footway"](area.searchArea);
|
|
|
|
way["highway"="cycleway"](area.searchArea);
|
|
|
|
);
|
|
|
|
out geom;' \
|
|
|
|
| jq '[ .elements[] | { OSMID: .id, Geometry: [ .geometry[] | [ .lat, .lon ] ], Tags: .tags } ]' > data/sidewalks.json
|