Generate geojson at deploy time from JOSM file
This commit is contained in:
parent
f3adeb7482
commit
f0e84f3142
6 changed files with 47 additions and 4 deletions
17
Makefile
17
Makefile
|
|
@ -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" \
|
||||
$@ $<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue