Skip to content

Commit

Permalink
Change out folder to be more "thematic"
Browse files Browse the repository at this point in the history
  • Loading branch information
Herover committed Nov 7, 2021
1 parent 8f051c6 commit 627f5c5
Show file tree
Hide file tree
Showing 28 changed files with 28,653 additions and 14,268 deletions.
28,488 changes: 14,244 additions & 14,244 deletions out/dagi.gml

Large diffs are not rendered by default.

1,390 changes: 1,390 additions & 0 deletions out/dagi/afstemningsomraade/afstemningsomraade.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/afstemningsomraade/afstemningsomraade.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions out/dagi/kommuneinddeling/kommuneinddeling.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/kommuneinddeling/kommuneinddeling.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions out/dagi/landsdel/landsdel.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/landsdel/landsdel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,178 changes: 2,178 additions & 0 deletions out/dagi/menighedsraadsafstemningsomraade/menighedsraadsafstemningsomraade.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions out/dagi/opstillingskreds/opstillingskreds.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/opstillingskreds/opstillingskreds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions out/dagi/politikreds/politikreds.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/politikreds/politikreds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
612 changes: 612 additions & 0 deletions out/dagi/postnummerinddeling/postnummerinddeling.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/postnummerinddeling/postnummerinddeling.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions out/dagi/retskreds/retskreds.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/retskreds/retskreds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions out/dagi/samlepostnummer/samlepostnummer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "FeatureCollection",
"name": "dagi_Samlepostnummer",
"features": [

]
}
6 changes: 6 additions & 0 deletions out/dagi/samlepostnummer/samlepostnummer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,147 changes: 2,147 additions & 0 deletions out/dagi/sogneinddeling/sogneinddeling.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/sogneinddeling/sogneinddeling.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions out/dagi/storkreds/storkreds.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/storkreds/storkreds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,694 changes: 7,694 additions & 0 deletions out/dagi/supplerendeBynavn/supplerendeBynavn.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions out/dagi/supplerendeBynavn/supplerendeBynavn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 20 additions & 19 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
url=$1
url=$2

projection="d3.geoMercator().center([13.5, 56.2]).scale(4900)"

Expand Down Expand Up @@ -37,23 +37,24 @@ cp $tmpDir"dagi.xsd" ${outDir}

function process () {
key=${1,}
mkdir "${outDir}${key}"
mkdir "${tmpDir}${key}"
ogr2ogr -f GeoJSON -lco RFC7946=YES -t_srs EPSG:4326 -s_srs EPSG:25832 "${outDir}${key}/dagi-${key}.json" "${tmpDir}dagi.gml" "dagi_${key^}"
npx geoproject "$projection" < "${outDir}${key}/dagi-${key}.json" > "${tmpDir}${key}/dagi-${key}.json" && \
npx geo2svg -w 650 -h 500 < "${tmpDir}${key}/dagi-${key}.json" > "${outDir}${key}/dagi-${key}.svg"
folder=${2}
mkdir -p "${outDir}${folder}/${key}"
mkdir -p "${tmpDir}${folder}/${key}"
ogr2ogr -f GeoJSON -lco RFC7946=YES -t_srs EPSG:4326 -s_srs EPSG:25832 "${outDir}${folder}/${key}/${key}.json" "${tmpDir}dagi.gml" "dagi_${key^}"
npx geoproject "$projection" < "${outDir}${folder}/${key}/${key}.json" > "${tmpDir}${folder}/${key}/${key}.json" && \
npx geo2svg -w 650 -h 500 < "${tmpDir}${folder}/${key}/${key}.json" > "${outDir}${folder}/${key}/${key}.svg"
}

process "Afstemningsomraade"
process "Kommuneinddeling"
process "Landsdel"
process "Menighedsraadsafstemningsomraade"
process "Opstillingskreds"
process "Politikreds"
process "Postnummerinddeling"
process "Regionsinddeling"
process "Retskreds"
process "Samlepostnummer"
process "Sogneinddeling"
process "Storkreds"
process "SupplerendeBynavn"
process "Afstemningsomraade" $1
process "Kommuneinddeling" $1
process "Landsdel" $1
process "Menighedsraadsafstemningsomraade" $1
process "Opstillingskreds" $1
process "Politikreds" $1
process "Postnummerinddeling" $1
process "Regionsinddeling" $1
process "Retskreds" $1
process "Samlepostnummer" $1
process "Sogneinddeling" $1
process "Storkreds" $1
process "SupplerendeBynavn" $1

0 comments on commit 627f5c5

Please sign in to comment.