Generate geojson at deploy time from JOSM file

This commit is contained in:
Chandler Swift 2025-11-09 16:54:25 -06:00
parent f3adeb7482
commit f0e84f3142
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
6 changed files with 47 additions and 4 deletions

View file

@ -1,3 +1,7 @@
.PHONY: deploy
deploy: data/plats.json data/track.geojson satellite
rsync -avz --exclude=unused/ --delete ./ bert:/srv/www/lawrencedeerclub.chandlerswift.com/
data/plats.json: scripts/get_plats.py
./scripts/get_plats.py data/plats.geojson
@ -5,6 +9,13 @@ data/plats.json: scripts/get_plats.py
satellite:
./scripts/download_satellite.py
.PHONY: deploy
deploy: data/plats.json satellite
rsync -avz --exclude=unused/ --delete ./ bert:/srv/www/lawrencedeerclub.chandlerswift.com/
data/track.geojson: resources/deercamp.osm
OSM_USE_CUSTOM_INDEXING=NO ogr2ogr \
-overwrite \
-f GeoJSON \
-nln track \
-lco RFC7946=YES \
-lco COORDINATE_PRECISION=8 \
-dialect SQLITE \
-sql "SELECT HSTORE_GET_VALUE(other_tags,'type') AS type, geometry FROM lines WHERE HSTORE_GET_VALUE(other_tags,'type') IS NOT NULL" \
$@ $<