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

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
data/plats.geojson data/plats.geojson
data/track.geojson
satellite/ satellite/

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 data/plats.json: scripts/get_plats.py
./scripts/get_plats.py data/plats.geojson ./scripts/get_plats.py data/plats.geojson
@ -5,6 +9,13 @@ data/plats.json: scripts/get_plats.py
satellite: satellite:
./scripts/download_satellite.py ./scripts/download_satellite.py
.PHONY: deploy data/track.geojson: resources/deercamp.osm
deploy: data/plats.json satellite OSM_USE_CUSTOM_INDEXING=NO ogr2ogr \
rsync -avz --exclude=unused/ --delete ./ bert:/srv/www/lawrencedeerclub.chandlerswift.com/ -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" \
$@ $<

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
resources/session.joz Normal file

Binary file not shown.

24
resources/style.mapcss Normal file
View file

@ -0,0 +1,24 @@
meta {
title: "Hunting Trails Preview";
version: "1.0";
description: "Styles for road/trail/shooting lane cleanup work.";
}
way[type=road] {
width: 8;
color: #654321;
opacity: 1.0;
}
way[type=trail] {
width: 3;
color: #800000;
opacity: 1.0;
}
way[type=shooting_lane] {
width: 2;
color: #000000;
dashes: 3,3;
opacity: 0.9;
}