diff options
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | bin/vicmap2osm.js | 7 |
3 files changed, 12 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a9c2fb..d159d7f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -237,7 +237,7 @@ build compareSuburb: - touch data/VICMAP_ADDRESS.zip - touch data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp - touch --no-create data/vicmap.geojson - - time make dist/vicmap-osm.geojson + - time make dist/vicmap-osm-with-suburb.geojson - time make dist/vicmapSuburbDiffersWithOSM.geojson - rm -f dist/vicmap-osm.geojson - make printDifferentSuburbs @@ -41,6 +41,11 @@ dist/vicmap-osm.geojson: data/vicmap.geojson ./bin/vicmap2osm.js $< $@ wc -l $@ +dist/vicmap-osm-with-suburb.geojson: data/vicmap.geojson + mkdir -p dist + ./bin/vicmap2osm.js --preserve-derivable-propreties $< $@ + wc -l $@ + dist/vicmap-osm.mbtiles: dist/vicmap-osm.geojson tippecanoe --force -o $@ --minimum-zoom=12 --maximum-zoom=12 --no-feature-limit --no-tile-size-limit --no-tile-stats --read-parallel $< diff --git a/bin/vicmap2osm.js b/bin/vicmap2osm.js index dfd1eeb..597043e 100755 --- a/bin/vicmap2osm.js +++ b/bin/vicmap2osm.js @@ -20,6 +20,11 @@ const argv = require('yargs/yargs')(process.argv.slice(2)) type: 'boolean', description: 'Includes _pfi tags to aid debugging' }) + .option('preserve-derivable-properties', { + type: 'boolean', + default: false, + description: 'If set, preserves addr:suburb, addr:postcode, addr:state, otherwise omits them' + }) .argv if (argv._.length < 2) { @@ -52,7 +57,7 @@ const transform = new Transform({ const osm = toOSM(feature, { tracing: argv.tracing, /* omit addr:suburb, addr:postcode, addr:state */ - includeDerivableProperties: false + includeDerivableProperties: argv.preserveDerivableProperties }) // some addresses we skip importing into OSM, see README.md#omitted-addresses |