From 13b0de59786afa7b64e6807a4a658e54f389fd18 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 11 Jun 2024 19:27:59 +0200 Subject: config.yml: Refine destination schema. Tighten column width and replace fixed-width numerics with single precisions floats. Also, align column names with the documented ones. --- config.yml | 165 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 80 insertions(+), 85 deletions(-) diff --git a/config.yml b/config.yml index d0e690c..eb59fb0 100644 --- a/config.yml +++ b/config.yml @@ -401,60 +401,57 @@ layers: create: geometry-type: MULTIPOLYGON fields: - - name: objektid + - name: OBJECTID type: Integer unique: true nullable: false - - name: year - type: Integer - subtype: Int16 - nullable: false - - name: beteckn + - name: Beteckn type: String - width: 23 + width: 12 unique: true nullable: false - - name: avverktyp + - name: ArendeAr + type: Integer + subtype: Int16 + nullable: false + - name: Avverktyp type: String width: 254 nullable: false - - name: skogstyp + - name: Skogstyp type: String width: 254 nullable: false - - name: date + - name: Inkomdatum type: Date nullable: false - name: AnmaldHa + # XXX convert to m²? type: Real - width: 24 - precision: 15 + subtype: Float32 nullable: false - name: SkogsodlHa type: Real - width: 24 - precision: 15 + subtype: Float32 nullable: false - name: NatforHa type: Real - width: 24 - precision: 15 + subtype: Float32 nullable: false - - name: status + - name: AvvSasong type: String - width: 21 + width: 254 nullable: false - - name: AvvSasong + - name: ArendeStat type: String width: 254 nullable: false - name: AvvHa type: Real - width: 24 - precision: 15 + subtype: Float32 - name: Avverkning type: String - width: 20 + width: 254 nullable: false source: download: @@ -470,19 +467,19 @@ layers: format: ESRI Shapefile layername: sksAvverkAnm fields: - OBJECTID: objektid - ArendeAr: year - Beteckn: beteckn - Avverktyp: avverktyp - Skogstyp: skogstyp - Inkomdatum: date - AnmaldHa: AnmaldHa - SkogsodlHa: SkogsodlHa - NatforHa: NatforHa - ArendeStat: status - AvvSasong: AvvSasong - AvvHa: AvvHa - Avverkning: Avverkning + - OBJECTID + - Beteckn + - ArendeAr + - Avverktyp + - Skogstyp + - Inkomdatum + - AnmaldHa + - SkogsodlHa + - NatforHa + - AvvSasong + - ArendeStat + - AvvHa + - Avverkning 'sks:UtfordAvverk': # https://geodpags.skogsstyrelsen.se/geodataport/feeds/UtfordAvverk.xml @@ -490,60 +487,58 @@ layers: create: geometry-type: MULTIPOLYGON fields: - - name: objektid + - name: OBJECTID type: Integer + # XXX there are duplicates(!?) #unique: true nullable: false - - name: year - type: Integer - subtype: Int16 - nullable: false - - name: beteckn + - name: Beteckn type: String - width: 8 + width: 12 #unique: true + # TODO: map "Visas ej" to NULL + nullable: false + - name: ArendeAr + type: Integer + subtype: Int16 nullable: false - - name: avverktyp + - name: Avverktyp type: String width: 254 nullable: false - - name: skogstyp + - name: Skogstyp type: String width: 254 nullable: false - name: AnmaldHa type: Real - width: 24 - precision: 15 + subtype: Float32 #nullable: false - name: SkogsodlHa type: Real - width: 24 - precision: 15 + subtype: Float32 nullable: false - name: NatforHa type: Real - width: 24 - precision: 15 + subtype: Float32 nullable: false - - name: date + - name: Avvdatum type: Date nullable: false - name: KallaDatum type: Date - name: KallaAreal type: String - width: 50 + width: 62 - name: Forebild type: String - width: 50 + width: 62 - name: Efterbild type: String - width: 59 - - name: Arealha + width: 62 + - name: ArealHa type: Real - width: 24 - precision: 15 + subtype: Float32 nullable: false sources: @@ -563,20 +558,20 @@ layers: format: ESRI Shapefile layername: sksUtfordAvverk-2000-2015 fields: - OBJECTID: objektid - Arendear: year - Beteckn: beteckn - Avverktyp: avverktyp - Skogstyp: skogstyp + OBJECTID: OBJECTID + Beteckn: Beteckn + Arendear: ArendeAr + Avverktyp: Avverktyp + Skogstyp: Skogstyp AnmaldHa: AnmaldHa SkogsodlHa: SkogsodlHa Natforha: NatforHa - Avvdatum: date + Avvdatum: Avvdatum KallaDatum: KallaDatum KallaAreal: KallaAreal Forebild: Forebild Efterbild: Efterbild - Arealha: Arealha + Arealha: ArealHa - source: download: @@ -594,20 +589,20 @@ layers: format: ESRI Shapefile layername: sksUtfordAvverk-2016-2019 fields: - OBJECTID: objektid - Arendear: year - Beteckn: beteckn - Avverktyp: avverktyp - Skogstyp: skogstyp + OBJECTID: OBJECTID + Beteckn: Beteckn + Arendear: ArendeAr + Avverktyp: Avverktyp + Skogstyp: Skogstyp AnmaldHa: AnmaldHa SkogsodlHa: SkogsodlHa Natforha: NatforHa - Avvdatum: date + Avvdatum: Avvdatum KallaDatum: KallaDatum KallaAreal: KallaAreal Forebild: Forebild Efterbild: Efterbild - Arealha: Arealha + Arealha: ArealHa - source: download: @@ -625,20 +620,20 @@ layers: format: ESRI Shapefile layername: sksUtfordAvverk-2020-2022 fields: - OBJECTID: objektid - Arendear: year - Beteckn: beteckn - Avverktyp: avverktyp - Skogstyp: skogstyp + OBJECTID: OBJECTID + Beteckn: Beteckn + Arendear: ArendeAr + Avverktyp: Avverktyp + Skogstyp: Skogstyp AnmaldHa: AnmaldHa SkogsodlHa: SkogsodlHa Natforha: NatforHa - Avvdatum: date + Avvdatum: Avvdatum KallaDatum: KallaDatum KallaAreal: KallaAreal Forebild: Forebild Efterbild: Efterbild - Arealha: Arealha + Arealha: ArealHa - source: download: @@ -654,20 +649,20 @@ layers: format: ESRI Shapefile layername: sksUtfordAvverk-2023- fields: - OBJECTID: objektid - Arendear: year - Beteckn: beteckn - Avverktyp: avverktyp - Skogstyp: skogstyp + OBJECTID: OBJECTID + Beteckn: Beteckn + Arendear: ArendeAr + Avverktyp: Avverktyp + Skogstyp: Skogstyp AnmaldHa: AnmaldHa SkogsodlHa: SkogsodlHa Natforha: NatforHa - Avvdatum: date + Avvdatum: Avvdatum KallaDatum: KallaDatum KallaAreal: KallaAreal Forebild: Forebild Efterbild: Efterbild - Arealha: Arealha + Arealha: ArealHa 'st:betesomraden': source: -- cgit v1.2.3