From 575f8a460d25868cda4e9cef522e43650164f89b Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 9 Jun 2025 14:17:32 +0200 Subject: Export feature "age" to MVT. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows client-side filtering. The "age" attribute is a signed short (int16) expressing the number of days since 1970-01-01. This covers the range 1880-04-15 to 2059-09-18 which should be more than enough. The source value is a Date or Datetime and depends on the source layer. - For vbk:*, it's the date at which the project was last saved in Vindbrukskollen. - For mrr:*, it's the date at which the application came to Bergsstaten for applications, and decision date for granted permits. - For avverk:*, it's the date at which the application came to Skogsstyrelsen for applications, and the clearcut date (according to Skogsstyrelsen) for completed objects. For other layers, we don't export that attribute. This makes the tiles a bit larger. Before (without the extra attribute): vbk: 1261× tiles, 599kiB uncompressed (avg=487B/t), 389kiB brotli (35%, avg=316B/t) avverk: 3734× tiles 115MiB uncompressed (avg=32kiB/t), 72MiB brotli (37%, avg=20kiB/t) mrr: 1324× 331kiB uncompressed (avg=257kiB/t), 289kiB brotli (13%, avg=223B/t) → total 121631367B uncompressed (avg=19kiB/t), 76692807B brotli (37%, avg=12kiB/t) After (with the extra attribute): vbk: 1261× tiles, 714kiB uncompressed (avg=580B/t), 425kiB brotli (40%, avg=345B/t) avverk: 3734× tiles 127MiB uncompressed (avg=35kiB/t), 78MiB brotli (39%, avg=21kiB/t) mrr: 1324× 323kiB uncompressed (avg=322kiB/t), 342kiB brotli (18%, avg=265B/t) → total 134274796B uncompressed (avg=21kiB/t), 82264731B brotli (39%, avg=13kiB/t) Summary: +12.1MiB uncompressed (+10.4%, avg=+1.95kiB/t) +5.3MiB compressed (+7.3%, avg=+882B/t) --- config.yml | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 9 deletions(-) (limited to 'config.yml') diff --git a/config.yml b/config.yml index 744122a..a9d1f85 100644 --- a/config.yml +++ b/config.yml @@ -2709,7 +2709,10 @@ layers: - AvvSasong - AvvHa - AvverkningsanmalanKlass - publish: anmald + publish: + anmald: + fields: + age: Inkomdatum 'sks:avverk_utford': # https://geodpags.skogsstyrelsen.se/geodataport/feeds/UtfordAvverk.xml @@ -2799,7 +2802,10 @@ layers: Beteckn: - replace: 'Visas ej' with: null - publish: utford + publish: + utford: + fields: + age: Avvdatum 'sametinget:betesomrade': description: 'Samebyarnas betesområden: Renbetesområden' @@ -3217,30 +3223,44 @@ layers: minzoom: 4 where: | "Raderat" IS FALSE AND "Statuskod" = 4 + fields: + age: SenasteUppdaterat station_processed: minzoom: 4 where: | "Raderat" IS FALSE AND "Statuskod" = 1 + fields: + age: SenasteUppdaterat station_approved: minzoom: 4 where: | "Raderat" IS FALSE AND "Statuskod" = 3 + fields: + age: SenasteUppdaterat station_revoked: minzoom: 4 where: | "Raderat" IS FALSE AND ("Statuskod" = 6 OR "Statuskod" = 9) + fields: + age: SenasteUppdaterat station_rejected: minzoom: 4 where: | "Raderat" IS FALSE AND "Statuskod" = 7 + fields: + age: SenasteUppdaterat station_dismounted: minzoom: 4 where: | "Raderat" IS FALSE AND "Statuskod" = 5 + fields: + age: SenasteUppdaterat station_appealed: minzoom: 4 where: | "Raderat" IS FALSE AND "Statuskod" = 8 + fields: + age: SenasteUppdaterat 'vbk:projekteringsomraden': description: Vindbrukskollen landbaserade projekteringsområden (Länsstyrelsen) @@ -3395,9 +3415,13 @@ layers: area_current: where: | "Raderat" IS FALSE AND "EjAktuell" IS FALSE + fields: + age: SenasteUppdaterat area_notcurrent: where: | "Raderat" IS FALSE AND "EjAktuell" IS NOT FALSE + fields: + age: SenasteUppdaterat 'vbk:havsbaserad_vindkraft': description: Vindbrukskollen havsbaserad vindkraft (Länsstyrelsen) @@ -3613,30 +3637,48 @@ layers: offshore_completed: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Uppförd' + fields: + age: SenasteUppdaterat offshore_approved: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Tillståndsansökan beviljad' + fields: + age: SenasteUppdaterat offshore_amended: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Ändringsansökan' + fields: + age: SenasteUppdaterat offshore_rejected: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Tillståndsansökan avslagen' + fields: + age: SenasteUppdaterat offshore_appealed: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Överklagad' + fields: + age: SenasteUppdaterat offshore_applied: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Tillståndsansökan inlämnad' + fields: + age: SenasteUppdaterat offshore_consultation: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Samråd inför tillståndsansökan' + fields: + age: SenasteUppdaterat offshore_investigation: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Inledande undersökningar' + fields: + age: SenasteUppdaterat offshore_revoked: where: | "Raderat" IS FALSE AND "Projektstatus" = 'Inte aktuell eller återkallad' + fields: + age: SenasteUppdaterat 'mrr:ut_metaller_industrimineral_ansokta': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -3678,7 +3720,10 @@ layers: path: mineralrattigheter.gpkg format: GPKG layername: ut_metaller_industrimineral_ansokta - publish: appl_met + publish: + appl_met: + fields: + age: appl_date 'mrr:ut_diamant_ansokta': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -3720,7 +3765,10 @@ layers: path: mineralrattigheter.gpkg format: GPKG layername: ut_diamant_ansokta - publish: appl_ogd + publish: + appl_ogd: + fields: + age: appl_date 'mrr:bearbetningskoncessioner_ansokta': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -3762,7 +3810,10 @@ layers: path: mineralrattigheter.gpkg format: GPKG layername: bearbetningskoncessioner_ansokta - publish: appl_ec + publish: + appl_ec: + fields: + age: appl_date 'mrr:markanvisningar_bk_ansokta': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -3861,7 +3912,10 @@ layers: licenceid: - replace: '-' with: null - publish: appr_met + publish: + appr_met: + fields: + age: dec_date 'mrr:ut_diamant_beviljade': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -3924,7 +3978,10 @@ layers: licenceid: - replace: '-' with: null - publish: appr_ogd + publish: + appr_ogd: + fields: + age: dec_date 'mrr:bearbetningskoncessioner_beviljade': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -3988,7 +4045,10 @@ layers: licenceid: - replace: '-' with: null - publish: appr_ec + publish: + appr_ec: + fields: + age: dec_date 'mrr:markanvisningar_bk_beviljade': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf @@ -4038,7 +4098,10 @@ layers: licenceid: - replace: '-' with: null - publish: appr_dl + publish: + appr_dl: + fields: + age: dec_date 'mrr:ut_metaller_industrimineral_forbud': # https://resource.sgu.se/dokument/produkter/mineralrattigheter-beskrivning.pdf -- cgit v1.2.3