aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 30 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index d7ff3f4..45bf34c 100644
--- a/Makefile
+++ b/Makefile
@@ -22,14 +22,31 @@ data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMPROP.gdb: data/VICMAP
data/vicmap-property.fgb: data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMPROP.gdb
ogr2ogr -f FlatGeobuf -t_srs 'EPSG:4326' -nlt PROMOTE_TO_MULTI $@ $< PARCEL_VIEW
-data/vicmap.geojson:
- ogr2ogr -f GeoJSONSeq -t_srs 'EPSG:4326' -mapFieldType DateTime=String $@ data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMADD.gdb
+data/vicmap-original.geojson: data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMADD.gdb
+ ogr2ogr -f GeoJSONSeq -t_srs 'EPSG:4326' -mapFieldType DateTime=String $@ $<
wc -l $@
-# used for quick debugging
-# ogr2ogr -f GeoJSONSeq -clipsrc 144.95392 -37.80260 144.97298 -37.79204 data/vicmap.geojson data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMADD.gdb
-vicmapExtract:
- ogr2ogr -f GeoJSONSeq -mapFieldType DateTime=String -clipsrc 144.95366 -37.80284 145.00272 -37.77482 data/vicmap.geojson data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMADD.gdb
+data/vicmap-debug.geojson: data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMADD.gdb
+ ogr2ogr -f GeoJSONSeq -clipsrc 144.95392 -37.80260 144.97298 -37.79204 $@ $<
+ wc -l $@
+
+data/vicmap-extracted.geojson: data/vicmap/ll_gda2020/filegdb/whole_of_dataset/victoria/VMADD.gdb
+ ogr2ogr -f GeoJSONSeq -mapFieldType DateTime=String -clipsrc 144.95366 -37.80284 145.00272 -37.77482 $@ $^
+ wc -l $@
+
+reset-vicmap-original: data/vicmap-original.geojson
+ ln -sf vicmap-original.geojson data/vicmap.geojson
+ touch --no-create $<
+
+reset-vicmap-debug: data/vicmap-debug.geojson
+ ln -sf vicmap-debug.geojson data/vicmap.geojson
+ touch --no-create $<
+
+reset-vicmap-extracted: data/vicmap-extracted.geojson
+ ln -sf vicmap-extracted.geojson data/vicmap.geojson
+ touch --no-create $<
+
+data/vicmap.geojson: reset-vicmap-original
cleanDist:
rm -rf dist
@@ -65,7 +82,7 @@ dist/vicmap-osm-uniq-flats-withinrange.geojson: dist/vicmap-osm-uniq-flats.geojs
dist/vicmap-osm-overlapping.geojson: dist/vicmap-osm-uniq-flats-withinrange.geojson
node --max_old_space_size=4096 ./bin/reportOverlap.js $< $@
-convertGeoJSONResultsToFGB:
+convertGeoJSONResultsToFGB: dist/vicmap-osm-with-suburb.geojson dist/vicmap-osm-uniq.geojson dist/vicmap-osm-uniq-flats.geojson dist/vicmap-osm-uniq-flats-withinrange.geojson
ogr2ogr -f FlatGeobuf dist/vicmap-osm-with-suburb.fgb dist/vicmap-osm-with-suburb.geojson
ogr2ogr -f FlatGeobuf dist/vicmap-osm-uniq.fgb dist/vicmap-osm-uniq.geojson
ogr2ogr -f FlatGeobuf dist/vicmap-osm-uniq-flats.fgb dist/vicmap-osm-uniq-flats.geojson
@@ -196,9 +213,9 @@ summariseBlocksByOSMAddr: dist/blocksByOSMAddr.geojson
ogrinfo -dialect sqlite -sql 'select count(*), NUMPOINTS = 0 from blocksByOSMAddr group by (NUMPOINTS = 0)' $<
# conflate processed vicmap data with osm data
-dist/conflate:
+dist/conflate: dist/vicmap-osm-uniq-flats-withinrange.geojson data/victoria-addr.osm.geojson dist/blocksByOSMAddr.geojson
mkdir -p $@
- ./bin/conflate.js dist/vicmap-osm-uniq-flats-withinrange.geojson data/victoria-addr.osm.geojson dist/blocksByOSMAddr.geojson $@
+ ./bin/conflate.js $^ $@
./bin/mrCoopDiff.js $@/mr_exactMatchSetFlats.geojson $@/mr_exactMatch.changes.json
dist/unitFromNumber.osc: dist/conflate/mr_explodeUnitFromNumber.geojson
@@ -215,13 +232,13 @@ convertConflationResultsToFGB:
ogr2ogr -f FlatGeobuf dist/conflate/fuzzyStreetMatchesSingle.fgb dist/conflate/fuzzyStreetMatchesSingle.geojson
ogr2ogr -f FlatGeobuf dist/conflate/fuzzyStreetMatchesMultiple.fgb dist/conflate/fuzzyStreetMatchesMultiple.geojson
-dist/vicmap-complex-conflation: dist/vicmap-complex.geojson
+dist/vicmap-complex-conflation: dist/vicmap-complex.geojson data/victoria-named-features.osm.geojson
mkdir -p $@
- ./bin/complex.js $< data/victoria-named-features.osm.geojson $@
+ ./bin/complex.js $^ $@
-dist/vicmap-building-conflation: dist/vicmap-building.geojson
+dist/vicmap-building-conflation: dist/vicmap-building.geojson data/victoria-named-features.osm.geojson
mkdir -p $@
- ./bin/building.js $< data/victoria-named-features.osm.geojson $@
+ ./bin/building.js $^ $@
# extract admin_level=9 from OSM
data/victoria-admin.osm.pbf: data/victoria.osm.pbf