diff --git a/scripts/deploy-typer.sh b/scripts/deploy-typer.sh index 6f730636..059ec5a0 100755 --- a/scripts/deploy-typer.sh +++ b/scripts/deploy-typer.sh @@ -7,6 +7,7 @@ scp build/AO.json grunnkart@hydra:~/tilesdata/Fylke/metadata_med_undertyper.json scp build/AR.json grunnkart@hydra:~/tilesdata/Biota/metadata_med_undertyper.json scp build/VV.json grunnkart@hydra:~/tilesdata/Naturvernområde/metadata_med_undertyper.json scp build/OR.json grunnkart@hydra:~/tilesdata/Datakilde/metadata_med_undertyper.json +scp build/RL.json grunnkart@hydra:~/tilesdata/Truet_art_natur/metadata_med_undertyper.json scp build/metabase.json grunnkart@hydra:~/tilesdata/metadata_med_undertyper.json ssh grunnkart@hydra docker restart nin-lookup-api diff --git a/steg/02/filindeks.js b/steg/02/filindeks.js index c5829e3f..6e16cb55 100644 --- a/steg/02/filindeks.js +++ b/steg/02/filindeks.js @@ -12,8 +12,8 @@ function lesFilindeks() { Object.keys(inn_filindeks).forEach(mapfile => { const p = path.parse(mapfile) const url = p.dir - if (!r[url]) r[url] = [] - r[url].push(inn_filindeks[mapfile]) + if (!r[url]) r[url] = {} + r[url][p.base] = inn_filindeks[mapfile] }) return r } diff --git a/steg/02/landskap.js b/steg/02/landskap.js index ffd455d8..6c6c7ea4 100644 --- a/steg/02/landskap.js +++ b/steg/02/landskap.js @@ -47,7 +47,7 @@ importer( ) importer( "Natur_i_Norge/Landskap/Landskapsgradient/relasjon_til_natursystem.csv", - "landskap_relasjon_natursystem" + "relasjon_til_natursystem" ) function importer(csvFil, utFil) { diff --git a/steg/13/metabase_kart.js b/steg/13/metabase_kart.js index 4686dbbd..266f98ea 100644 --- a/steg/13/metabase_kart.js +++ b/steg/13/metabase_kart.js @@ -35,9 +35,9 @@ function addKartformat() { const node = tre[xkode] const target = tre[xkode] const maps = filindeks[node.url] - if (xkode === "NN-NA-BS-6SE") debugger if (!maps) return - maps.forEach(mapfile => { + Object.keys(maps).forEach(base => { + const mapfile = maps[base] if (".mbtiles.geojson".indexOf(path.extname(mapfile.filename)) < 0) return if (mapfile.filename.indexOf("3857") < 0) return if (!target.kart) target.kart = { format: {} } diff --git a/steg/13/reservebilder.js b/steg/13/reservebilder.js index 6337c832..d7f88066 100644 --- a/steg/13/reservebilder.js +++ b/steg/13/reservebilder.js @@ -19,7 +19,8 @@ function finnReserverbilder() { Object.keys(tre).forEach(xkode => { const node = tre[xkode] const maps = mapfiles[node.url] - if (maps) return + if (!maps) return + if (maps["forside_408.jpg"]) return // Already have an image const barn = barnAv[xkode] if (!barn) return barn.sort((a, b) => a > b) diff --git a/steg/15/metabase_bilder.js b/steg/15/metabase_bilder.js index 7c63327e..72405287 100644 --- a/steg/15/metabase_bilder.js +++ b/steg/15/metabase_bilder.js @@ -9,11 +9,11 @@ let filindeks = io.lesDatafil("filindeks") Object.keys(full).forEach(kode => { const node = full[kode] - const fil = filindeks[node.url] + const filer = filindeks[node.url] node.foto = node.foto || {} - if (!fil) return + if (!filer) return if (kode == "NN-NA") debugger - const forside = fil.find(x => x.filename.indexOf("forside_408") === 0) + const forside = filer["forside_408.jpg"] || filer["forside_408.png"] if (!forside) return node.foto.forside = { url: baseUrl + node.url + "/" + forside.filename, diff --git a/steg/20/typer.js b/steg/20/typer.js index 93f9b6ea..863f070b 100644 --- a/steg/20/typer.js +++ b/steg/20/typer.js @@ -5,7 +5,7 @@ const typesystem = require("@artsdatabanken/typesystem") let data = io.lesBuildfil("metabase") -const prefixes = ["AO", "AR", "NN-LA", "NN-NA", "OR", "VV"] +const prefixes = ["AO", "AR", "NN-LA", "NN-NA", "OR", "VV", "RL"] prefixes.forEach(prefix => { skrivFil(prefix)