aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml30
-rw-r--r--Makefile16
2 files changed, 41 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2476dd9..0cf08ec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,20 @@
image: "debian:buster-slim"
+cache:
+ key: global
+ paths:
+ - .yarn
+ - node_modules
+ - data/vicmap.geojson
+
stages:
+ - prepare
- build
-build:
- stage: build
+prepare:
+ stage: prepare
+ cache:
+ policy: push
script:
- apt-get update && apt-get install -y curl gnupg gdal-bin unzip wget make
- curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
@@ -13,9 +23,23 @@ build:
- apt-get update && apt-get install -y yarn nodejs
- yarn install
- mkdir -p dist
- - make data/VICMAP_ADDRESS.zip unzip
- make data/vicmap.geojson
+ when: manual
+
+build:
+ stage: build
+ cache:
+ policy: pull
+ script:
+ - apt-get update && apt-get install -y curl gnupg make
+ - curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
+ - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
+ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
+ - apt-get update && apt-get install -y yarn nodejs
+ - yarn install
+ - mkdir -p dist
- make dist/vicmap-osm.geojson
+ - make dist/vicmap-osm-flats.geojson
artifacts:
name: "build"
paths:
diff --git a/Makefile b/Makefile
index 7fe9954..9013347 100644
--- a/Makefile
+++ b/Makefile
@@ -5,9 +5,21 @@ data/VICMAP_ADDRESS.zip:
mkdir -p data
wget --no-verbose --directory-prefix=data https://www.alantgeo.com.au/share/VICMAP_ADDRESS.zip
-unzip: data/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 $<
+
+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 $<
+ unzip -d data/vicmap -n $<
+
+data/vicmap-property.fgb: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMPROP/layer/property_view.shp
+ ogr2ogr -f FlatGeobuf $@ $<
data/vicmap.geojson: data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp
ogr2ogr -f GeoJSONSeq $@ $<