aboutsummaryrefslogtreecommitdiffstats
path: root/config.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-10-19 20:54:07 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-10-19 21:45:49 +0200
commiteaa32133e3f28026ca0a56e53f95decf15bf0a51 (patch)
treebefdd105cf53a246aee3e089f0fdd5101a27bc0c /config.yml
parenta0b1ff8635751d277a7a1612ac37aec1c92c887e (diff)
Add layer with noteworthy dams.
Unfortunately the dam register is way too noisy Unfortunately it looks like there is no way to download a pre-curated dam registry with only noteworthy dams used for production (SvK's dammar_pf.shp comes close but still misses some), so we manually remove the ones which are more than 2km from a production site or a power station.
Diffstat (limited to 'config.yml')
-rw-r--r--config.yml223
1 files changed, 223 insertions, 0 deletions
diff --git a/config.yml b/config.yml
index 385baa8..18cd431 100644
--- a/config.yml
+++ b/config.yml
@@ -69,6 +69,7 @@ layer-groups:
ri: 'ri:*'
svk: 'svk:*'
misc:
+ - dammar
- gigafactories
@@ -4020,3 +4021,225 @@ layers:
maxzoom: 5
gigafactories:
minzoom: 6
+
+ 'dammar':
+ # https://www.smhi.se/data/utforskaren-oppna-data/se-hy-dammregistret
+ description: Dammar
+ create:
+ # https://www.smhi.se/polopoly_fs/1.34541!/dammprod%202013_3%2C%20beskrivning%2C%20SVAR2012_2.pdf
+ geometry-type: POINT
+ fields:
+ - name: DammID
+ type: String
+ subtype: UUID
+ #width: 36
+ unique: true
+ nullable: false
+ comment: Dammenhetens identitet
+ - name: LST_OBJID
+ type: String
+ width: 32
+ comment: Länsstyrelsens objektid
+ - name: Datum
+ type: Date
+ nullable: false
+ comment: Datum för registrering av dammenheten i SVAR
+ - name: DNamn
+ type: String
+ width: 64
+ comment: Dammenhetens namn
+ - name: Status
+ type: Integer
+ subtype: Int16
+ nullable: false
+ - name: Regleringstyp
+ type: Integer
+ subtype: Int16
+ nullable: false
+ - name: Konstruktion
+ type: Integer
+ subtype: Int16
+ nullable: false
+ - name: ByggAr
+ type: Integer
+ subtype: Int16
+ comment: År för första byggnation av dammenheten
+ - name: DammHojd
+ type: Real
+ subtype: Float32
+ comment: Dammdelens högsta höjd (m)
+ - name: KronLangd
+ type: Real
+ subtype: Float32
+ comment: Krönlängd (m)
+ - name: Fiskvag
+ type: Integer
+ subtype: Int16
+ nullable: false
+ comment: Förekomst och typ av fiskväg vid dammenheten
+ - name: FiskvagByggAr
+ type: Integer
+ subtype: Int16
+ comment: Byggår fiskväg
+ - name: Fiskavledare
+ type: Integer
+ subtype: Int16
+ comment: Finns fiskavledare till fiskvägen
+ - name: Vandringshinder
+ type: Integer
+ subtype: Bool
+ nullable: false
+ comment: Om dammenheten utgör ett vandringshinder
+ - name: HARO
+ type: Integer
+ nullable: false
+ comment: Huvudavrinningsområdesnummer
+ - name: Vattendistrikt
+ type: String
+ width: 10
+ nullable: false
+ comment: Huvudavrinningsområdesnummer
+ - name: inrapp_lst
+ type: String
+ width: 32
+ nullable: false
+ comment: Den Länsstyrelse dammenheten är inrapporterad av
+ - name: eu_cd
+ type: String
+ width: 32
+ comment: Vattenförekomstidentitet
+ - name: vf_typ
+ type: String
+ width: 1
+ comment: Typ av vattenförekomst
+ - name: vy_eucd
+ type: String
+ width: 32
+ comment: Vattenförekomstidentitet för eventuell vattenyta kopplat till dammanläggning
+ - name: vy_vf_typ
+ type: String
+ width: 1
+ comment: Typ av vattenförekomst för eventuell vattenyta kopplat till dammanläggning
+ - name: DammanlID
+ type: String
+ width: 64
+ comment: Identitet för eventuell dammanläggning dammenheten är kopplad till
+ - name: Namn
+ type: String
+ width: 64
+ comment: Dammanläggningens namn
+ - name: Verksamhet
+ type: Integer
+ subtype: Int16
+ - name: OmbyggAr
+ type: Integer
+ subtype: Int16
+ comment: År för idrifttagande av anläggning i dess nuvarande skepnad
+ - name: DG
+ type: Real
+ subtype: Float32
+ comment: Högsta dämningsgräns (m) enligt tillstånd
+ - name: SG
+ type: Real
+ subtype: Float32
+ comment: Högsta dämningsgräns (m) enligt tillstånd
+ - name: HojdSys
+ type: Integer
+ subtype: Int16
+ comment: Höjdsystem som DG och SG räknats i
+ - name: MY
+ type: Real
+ comment: Magasinsyta (km²) vid angiven DG
+ - name: RV
+ type: Real
+ comment: Reglerbar volym (milj. m³)
+ - name: Kommentar
+ type: String
+ width: 254
+ comment: Inrapporterade kommentarer från Länsstyrelserna
+ - name: XX_Distance
+ type: Real
+ comment: Distance to the closest SvK station or production dam
+ source:
+ #download: 'https://opendata-view.smhi.se/SMHI_vatten_DamOrWeir/HY.PhysicalWaters.ManMadeObject/ows?service=WFS&request=GetFeature&typeNames=HY.PhysicalWaters.ManMadeObject&outputFormat=SHAPE-ZIP&srsName=EPSG:3006&format_options=charset:utf-8'
+ cache: custom/HY_PhysicalWaters_ManMadeObject.zip
+ unar:
+ format: zip
+ patterns:
+ - 'HY_PhysicalWaters_ManMadeObject.*'
+ import:
+ path: 'HY_PhysicalWaters_ManMadeObject.shp'
+ format: ESRI Shapefile
+ layername: HY_PhysicalWaters_ManMadeObject
+ field-map:
+ dammid: DammID
+ lst_objid: LST_OBJID
+ datum: Datum
+ dnamn: DNamn
+ status: Status
+ regl_typ: Regleringstyp
+ konstr: Konstruktion
+ byggar: ByggAr
+ dammhojd: DammHojd
+ kron: KronLangd
+ fiskvag: Fiskvag
+ fbygg: FiskvagByggAr
+ fiskavl: Fiskavledare
+ vhinder: Vandringshinder
+ haro: HARO
+ rbd: Vattendistrikt
+ inrapp_lst: inrapp_lst
+ eu_cd: eu_cd
+ vf_typ: vf_typ
+ vy_eucd: vy_eucd
+ vy_vf_typ: vy_vf_typ
+ dammanlid: DammanlID
+ namn: Namn
+ verksmht: Verksamhet
+ ombyggar: OmbyggAr
+ dg: DG
+ sg: SG
+ hojd_sys: HojdSys
+ my: MY
+ rv: RV
+ kommentar: Kommentar
+ XXdistance: XX_Distance
+ value-map:
+ dammid:
+ - replace: '\{([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})\}'
+ with: '{0}'
+ type: regex
+ byggar:
+ - replace: 0
+ with: null
+ dammhojd:
+ - replace: 0
+ with: null
+ kron:
+ - replace: 0
+ with: null
+ fbygg:
+ - replace: 0
+ with: null
+ vhinder:
+ - replace: 2
+ with: 0
+ ombyggar:
+ - replace: 0
+ with: null
+ dg:
+ - replace: 0
+ with: null
+ sg:
+ - replace: 0
+ with: null
+ my:
+ - replace: 0
+ with: null
+ rv:
+ - replace: 0
+ with: null
+ publish:
+ dammar:
+ where: |
+ "Status" = 1 AND "XX_Distance" BETWEEN 0 AND 2000