From 2d8f839914feb2b9d31f2682b1c9992dd21c9b16 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Wed, 4 Jun 2025 15:44:51 +0200
Subject: VBK: Use the shapefile as source for offshore projects.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The file appears to be official and updated as often as the GPKG
nowdays.  Both have 101 distinct features.

And unlike the GPKG the multipolygons are not split, so we add the
UNIQUE CONSTRAINT on "OmrID".

For some reason there are a lot of duplicates in the GPKG.

    sqlite> SELECT "ObjectID", COUNT(*) FROM "lst_vbk_havsbaserad_vindkraft" GROUP BY 1 ORDER BY 2;
    101|9
    1|24
    2|24
    […]
    100|24
---
 schema.sql | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 91a4631..c16eac0 100644
--- a/schema.sql
+++ b/schema.sql
@@ -4576,6 +4576,14 @@ ALTER TABLE ONLY postgis."svk:transmissionsnatsprojekt"
     ADD CONSTRAINT "svk:transmissionsnatsprojekt_pkey" PRIMARY KEY (ogc_fid);
 
 
+--
+-- Name: vbk:havsbaserad_vindkraft vbk:havsbaserad_vindkraft_OmrID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."vbk:havsbaserad_vindkraft"
+    ADD CONSTRAINT "vbk:havsbaserad_vindkraft_OmrID_key" UNIQUE ("OmrID");
+
+
 --
 -- Name: vbk:havsbaserad_vindkraft vbk:havsbaserad_vindkraft_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
 --
-- 
cgit v1.2.3

