aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--README.md2
-rw-r--r--config/osmium-export-config.json18
3 files changed, 32 insertions, 1 deletions
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:*"]
+}