blob: f295eef0e1dfce54016d364b6d8793f1161e21a5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# download VicMap source data
# the URL here usually gets manually updated weekly though no guarantees
# it's a mirror of the upstream VICMAP data with split shp files reduced to a single shp file
data/VICMAP_ADDRESS.zip:
mkdir -p data
wget --no-verbose --directory-prefix=data https://www.alantgeo.com.au/share/VICMAP_ADDRESS.zip
# cadastre used for debugging
data/VICMAP_PROPERTY.zip:
mkdir -p data
wget --no-verbose --directory-prefix=data https://www.alantgeo.com.au/share/VICMAP_PROPERTY.zip
data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp: data/VICMAP_ADDRESS.zip
mkdir -p data/vicmap
unzip -d data/vicmap -n $<
# update mtime so that Make doesn't see it as outdated
touch --no-create $@
data/vicmap/ll_gda94/sde_shape/whole/VIC/VMPROP/layer/property_view.shp: data/VICMAP_PROPERTY.zip
mkdir -p data/vicmap
unzip -d data/vicmap -n $<
touch --no-create $@
data/vicmap-property.fgb: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMPROP/layer/property_view.shp
ogr2ogr -f FlatGeobuf -nlt PROMOTE_TO_MULTI $@ $<
data/vicmap.geojson: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp
ogr2ogr -f GeoJSONSeq $@ $<
dist/vicmap-osm.geojson: data/vicmap.geojson
./bin/vicmap2osm.js $< $@
dist/vicmap-osm-uniq.geojson: dist/vicmap-osm.geojson
node --max-old-space-size=4096 bin/reduceDuplicates.js $< $@
dist/vicmap-osm-uniq-flats.geojson: dist/vicmap-osm-uniq.geojson
./bin/reduceOverlap.js $< $@
loadPgOSM: dist/vicmap-osm.geojson
ogr2ogr -f PostgreSQL PG: $< -lco UNLOGGED=YES -nln vm_osm
data/vicmap.fgb: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp
ogr2ogr -f FlatGeobuf $@ $<
dist/vicmap-osm.fgb: dist/vicmap-osm.geojson
ogr2ogr -f FlatGeobuf $@ $<
# useful for development to be able to query a database
loadPgAdd: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp
ogr2ogr -f PostgreSQL PG: $< -lco UNLOGGED=YES -nln vmadd
# index all columns for faster queries during development
psql -f src/createIndexQuery.sql --tuples-only | psql
loadPgProp: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMPROP/layer/property_view.shp
ogr2ogr -f PostgreSQL PG: $< -lco UNLOGGED=YES -nln vmprop
|