From cf35c3e76b9befcfc9073205c663cbba172e5e28 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Mon, 17 May 2021 16:54:37 +1000 Subject: include victoria boundary in blocks --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a0f0392..67e6fa2 100644 --- a/Makefile +++ b/Makefile @@ -107,11 +107,15 @@ data/victoria-roads.osm.pbf: data/victoria.osm.pbf # extract road lines into geojson data/victoria-roads.geojson: data/victoria-roads.osm.pbf - osmium export --geometry-types=linestring --output-format=geojsonseq --output $@ $< + osmium export --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 # then convert to fgb -data/victoria-roads.fgb: data/victoria-roads.geojson - ogr2ogr -f FlatGeobuf -nlt LINESTRING $@ $< +data/victoria-roads.fgb: data/victoria-roads.geojson data/victoria-boundary.geojson + ogr2ogr -f FlatGeobuf -explodecollections -nlt MULTILINESTRING $@ $< # construct block polygons based on OSM roads data/blocks.fgb: data/victoria-roads.fgb -- cgit v1.2.3