aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndrew Harvey <andrew@alantgeo.com.au>2021-05-25 21:52:49 +1000
committerAndrew Harvey <andrew@alantgeo.com.au>2021-05-25 21:52:49 +1000
commitb10c8ea6800afa310cad1c9371c6af392473d2d9 (patch)
tree2dd273b68bb787372599d49f5fbc242b3f7a247c /Makefile
parent12e3ec6bb627d2ce78cfb310b27b899527cdccb6 (diff)
avoid append in make file
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d1afbec..1c2ec91 100644
--- a/Makefile
+++ b/Makefile
@@ -117,11 +117,13 @@ data/victoria-roads.geojson: data/victoria-roads.osm.pbf
osmium export --overwrite --geometry-types=linestring --output-format=geojsonseq --format-option=print_record_separator=false --output $@ $<
data/victoria-boundary.geojson:
- npx osm-geojson 2316741 | ogr2ogr -f GeoJSONSeq -explodecollections -nlt MULTILINESTRING $@ /vsistdin/
- cat $@ >> data/victoria-roads.geojson
+ ./node_modules/.bin/osm-geojson 2316741 | ogr2ogr -f GeoJSONSeq -explodecollections -nlt MULTILINESTRING $@ /vsistdin/
+
+data/victoria-roads-and-boundary.geojson: data/victoria-roads.geojson data/victoria-boundary.geojson
+ cat $^ > $@
# then convert to fgb
-data/victoria-roads.fgb: data/victoria-roads.geojson data/victoria-boundary.geojson
+data/victoria-roads.fgb: data/victoria-roads-and-boundary.geojson
ogr2ogr -f FlatGeobuf -explodecollections -nlt MULTILINESTRING $@ $<
# construct block polygons based on OSM roads