diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 21 | ||||
-rwxr-xr-x | bin/get-kk.sh | 11 |
3 files changed, 35 insertions, 0 deletions
@@ -1 +1,4 @@ build/* +fetch-* +src/data/*.json +vendor/* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1bf0d24 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +DATAFILES = src/data/bydele.json + +all: fetch-vendor-kk + +newfiles-vendor-kk = vendor/kk/*.json +fetch-vendor-kk: + bin/get-kk.sh + touch $@ + +data-transform: $(DATAFILES) + +src/data/%.json: vendor/kk/%.geojson + jq --tab --sort-keys . $< > $@ + +clean: + +distclean: clean + rm -f $(newfiles-vendor-kk) + rm -f fetch-vendor-kk + +.PHONY: all clean distclean diff --git a/bin/get-kk.sh b/bin/get-kk.sh new file mode 100755 index 0000000..1d50f10 --- /dev/null +++ b/bin/get-kk.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -eu + +BINDIR="$(dirname "$0")" +BASEPATH="$BINDIR/.." +DATADIR="$BASEPATH/vendor/kk" + +mkdir -p "$DATADIR" + +wget -O "$DATADIR/bydele.geojson" 'http://wfs-kbhkort.kk.dk/k101/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=k101:bydel&outputFormat=json&SRSNAME=EPSG:4326' |