From b10c8ea6800afa310cad1c9371c6af392473d2d9 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Tue, 25 May 2021 21:52:49 +1000 Subject: avoid append in make file --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3