From 60875e0a0b2bc6114a7f436dca6b47763f90cdef Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Wed, 5 May 2021 21:11:24 +1000 Subject: add targets to download existing addresses from OSM --- Makefile | 13 +++++++++++++ README.md | 2 +- config/osmium-export-config.json | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 config/osmium-export-config.json diff --git a/Makefile b/Makefile index ab77693..0761994 100644 --- a/Makefile +++ b/Makefile @@ -61,3 +61,16 @@ loadPgAdd: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp loadPgProp: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMPROP/layer/property_view.shp ogr2ogr -f PostgreSQL PG: $< -lco UNLOGGED=YES -nln vmprop + +data/victoria.osm.pbf: + wget --no-verbose --directory-prefix=data http://download.openstreetmap.fr/extracts/oceania/australia/victoria.osm.pbf + +# addr:suburb, addr:postcode alone without a housenumber or being an interpolation way aren't of much use for comparisons +data/victoria-addr.osm.pbf: data/victoria.osm.pbf + osmium tags-filter --output=$@ --overwrite $< addr:housenumber addr:interpolation + +data/victoria-addr.osm.geojson: data/victoria-addr.osm.pbf + osmium export --config=config/osmium-export-config.json --output-format=geojsonseq --output=$@ --overwrite $< + +data/victoria-addr.osm.fgb: data/victoria-addr.osm.geojson + ogr2ogr -f FlatGeobuf -nlt PROMOTE_TO_MULTI $@ $< diff --git a/README.md b/README.md index 32d9c46..daeedbe 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The _prepare_ stage downloads Vicmap Address data and converts it into GeoJSON, The _build_ stage does all the processing to produce the import candidate data and intermediate datasets and reports. -## Build candidate files +## Build candidate files (pre-conflation) Download source Vicmap data and convert to GeoJSON: diff --git a/config/osmium-export-config.json b/config/osmium-export-config.json new file mode 100644 index 0000000..2c8033d --- /dev/null +++ b/config/osmium-export-config.json @@ -0,0 +1,18 @@ +{ + "attributes": { + "type": true, + "id": true, + "version": false, + "changeset": false, + "timestamp": false, + "uid": false, + "user": false, + "way_nodes": true + }, + "format_options": { + }, + "linear_tags": ["addr:interpolation"], + "area_tags": ["addr:housenumber"], + "exclude_tags": [], + "include_tags": ["addr:*"] +} -- cgit v1.2.3