From 256b69ea36959f84bde51279e4720f27daf54c4f Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Thu, 26 Sep 2024 02:40:04 +0200
Subject: =?UTF-8?q?Add=20layer=20data=20for=20Renn=C3=A4ringen.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From Sametinget via Länsstyrelsen.
---
 schema.sql | 414 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 412 insertions(+), 2 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 962bce1..e119193 100644
--- a/schema.sql
+++ b/schema.sql
@@ -2,8 +2,8 @@
 -- PostgreSQL database dump
 --
 
--- Dumped from database version 15.6 (Debian 15.6-0+deb12u1)
--- Dumped by pg_dump version 15.6 (Debian 15.6-0+deb12u1)
+-- Dumped from database version 15.8 (Debian 15.8-0+deb12u1)
+-- Dumped by pg_dump version 15.8 (Debian 15.8-0+deb12u1)
 
 SET statement_timeout = 0;
 SET lock_timeout = 0;
@@ -531,6 +531,208 @@ ALTER TABLE postgis."mrr:torvkoncessioner_ogc_fid_seq" OWNER TO webmap_import;
 ALTER SEQUENCE postgis."mrr:torvkoncessioner_ogc_fid_seq" OWNED BY postgis."mrr:torvkoncessioner".ogc_fid;
 
 
+--
+-- Name: ren:omr_riks; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."ren:omr_riks" (
+    ogc_fid bigint NOT NULL,
+    "OBJECTID" integer NOT NULL,
+    "LANK" character varying(254) NOT NULL,
+    "LANSKOD" character varying(25) NOT NULL,
+    "OMR_NR" integer,
+    "ARET_RUNT" integer,
+    "SAMEBY" character varying(62) NOT NULL,
+    "ANSVARIG" character varying(25) NOT NULL,
+    "AKTUALITET" date NOT NULL,
+    "SIGNATUR" character varying(25),
+    "GlobalID" uuid NOT NULL,
+    wkb_geometry postgis.geometry(MultiPolygon,3006)
+);
+
+
+ALTER TABLE postgis."ren:omr_riks" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "ren:omr_riks"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."ren:omr_riks" IS 'Riksintresse Rennäringen — Kärnområde';
+
+
+--
+-- Name: ren:omr_riks_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."ren:omr_riks_ogc_fid_seq"
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE postgis."ren:omr_riks_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: ren:omr_riks_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."ren:omr_riks_ogc_fid_seq" OWNED BY postgis."ren:omr_riks".ogc_fid;
+
+
+--
+-- Name: ren:riks_ren; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."ren:riks_ren" (
+    ogc_fid bigint NOT NULL,
+    "OBJECTID" integer NOT NULL,
+    "LAGRUM" character varying(254) NOT NULL,
+    "AKTUALITET" date NOT NULL,
+    "SIGNATUR" character varying(25) NOT NULL,
+    "LANK" character varying(254),
+    "GlobalID" uuid NOT NULL,
+    wkb_geometry postgis.geometry(MultiPolygon,3006)
+);
+
+
+ALTER TABLE postgis."ren:riks_ren" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "ren:riks_ren"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."ren:riks_ren" IS 'Riksintresse Rennäringen';
+
+
+--
+-- Name: ren:riks_ren_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."ren:riks_ren_ogc_fid_seq"
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE postgis."ren:riks_ren_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: ren:riks_ren_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."ren:riks_ren_ogc_fid_seq" OWNED BY postgis."ren:riks_ren".ogc_fid;
+
+
+--
+-- Name: sametinget:betesomraden; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."sametinget:betesomraden" (
+    ogc_fid bigint NOT NULL,
+    "OBJECTID" integer NOT NULL,
+    "SAMEBY_ID" integer NOT NULL,
+    "BY_ID" integer,
+    "NAMN" character varying(62) NOT NULL,
+    "SIGNATUR" character varying(25) NOT NULL,
+    "SAMEBY_TYP" character varying(62) NOT NULL,
+    "BY_OMR" boolean NOT NULL,
+    "OVR_OMR" boolean NOT NULL,
+    "AKTUALITET" date NOT NULL,
+    wkb_geometry postgis.geometry(MultiPolygon,3006)
+);
+
+
+ALTER TABLE postgis."sametinget:betesomraden" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "sametinget:betesomraden"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."sametinget:betesomraden" IS 'Samebyarnas betesområden: Renbetesområden';
+
+
+--
+-- Name: sametinget:betesomraden_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."sametinget:betesomraden_ogc_fid_seq"
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE postgis."sametinget:betesomraden_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: sametinget:betesomraden_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."sametinget:betesomraden_ogc_fid_seq" OWNED BY postgis."sametinget:betesomraden".ogc_fid;
+
+
+--
+-- Name: sametinget:flytled; Type: TABLE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE TABLE postgis."sametinget:flytled" (
+    ogc_fid bigint NOT NULL,
+    "OBJECTID" integer NOT NULL,
+    "LED_ID" integer NOT NULL,
+    "BYNR1" integer NOT NULL,
+    "BYNR2" integer NOT NULL,
+    "BYNR3" integer NOT NULL,
+    "SAMEBY1" character varying(62),
+    "SAMEBY2" character varying(62),
+    "SAMEBY3" character varying(62),
+    "KKOD" integer NOT NULL,
+    "BESKRIVNIN" character varying(62),
+    "ARSTID" character varying(62),
+    "KONV_AR" character varying(62),
+    "SIGNATUR" character varying(25),
+    "RIKSINTR" boolean NOT NULL,
+    "FAST_LED" boolean NOT NULL,
+    "AKTUALITET" character varying(10),
+    "GlobalID" uuid NOT NULL,
+    wkb_geometry postgis.geometry(MultiLineString,3006)
+);
+
+
+ALTER TABLE postgis."sametinget:flytled" OWNER TO webmap_import;
+
+--
+-- Name: TABLE "sametinget:flytled"; Type: COMMENT; Schema: postgis; Owner: webmap_import
+--
+
+COMMENT ON TABLE postgis."sametinget:flytled" IS 'Samebyarnas markanvändningsredovisning: Flyttled';
+
+
+--
+-- Name: sametinget:flytled_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import
+--
+
+CREATE SEQUENCE postgis."sametinget:flytled_ogc_fid_seq"
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE postgis."sametinget:flytled_ogc_fid_seq" OWNER TO webmap_import;
+
+--
+-- Name: sametinget:flytled_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import
+--
+
+ALTER SEQUENCE postgis."sametinget:flytled_ogc_fid_seq" OWNED BY postgis."sametinget:flytled".ogc_fid;
+
+
 --
 -- Name: sks:AvverkAnm; Type: TABLE; Schema: postgis; Owner: webmap_import
 --
@@ -899,6 +1101,34 @@ ALTER TABLE ONLY postgis."mrr:olja_gas_diamant_approved" ALTER COLUMN ogc_fid SE
 ALTER TABLE ONLY postgis."mrr:torvkoncessioner" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."mrr:torvkoncessioner_ogc_fid_seq"'::regclass);
 
 
+--
+-- Name: ren:omr_riks ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:omr_riks" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."ren:omr_riks_ogc_fid_seq"'::regclass);
+
+
+--
+-- Name: ren:riks_ren ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:riks_ren" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."ren:riks_ren_ogc_fid_seq"'::regclass);
+
+
+--
+-- Name: sametinget:betesomraden ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:betesomraden" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."sametinget:betesomraden_ogc_fid_seq"'::regclass);
+
+
+--
+-- Name: sametinget:flytled ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:flytled" ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis."sametinget:flytled_ogc_fid_seq"'::regclass);
+
+
 --
 -- Name: sks:AvverkAnm ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import
 --
@@ -1182,6 +1412,102 @@ ALTER TABLE ONLY postgis."mrr:torvkoncessioner"
     ADD CONSTRAINT "mrr:torvkoncessioner_pkey" PRIMARY KEY (ogc_fid);
 
 
+--
+-- Name: ren:omr_riks ren:omr_riks_GlobalID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:omr_riks"
+    ADD CONSTRAINT "ren:omr_riks_GlobalID_key" UNIQUE ("GlobalID");
+
+
+--
+-- Name: ren:omr_riks ren:omr_riks_OBJECTID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:omr_riks"
+    ADD CONSTRAINT "ren:omr_riks_OBJECTID_key" UNIQUE ("OBJECTID");
+
+
+--
+-- Name: ren:omr_riks ren:omr_riks_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:omr_riks"
+    ADD CONSTRAINT "ren:omr_riks_pkey" PRIMARY KEY (ogc_fid);
+
+
+--
+-- Name: ren:riks_ren ren:riks_ren_GlobalID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:riks_ren"
+    ADD CONSTRAINT "ren:riks_ren_GlobalID_key" UNIQUE ("GlobalID");
+
+
+--
+-- Name: ren:riks_ren ren:riks_ren_OBJECTID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:riks_ren"
+    ADD CONSTRAINT "ren:riks_ren_OBJECTID_key" UNIQUE ("OBJECTID");
+
+
+--
+-- Name: ren:riks_ren ren:riks_ren_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."ren:riks_ren"
+    ADD CONSTRAINT "ren:riks_ren_pkey" PRIMARY KEY (ogc_fid);
+
+
+--
+-- Name: sametinget:betesomraden sametinget:betesomraden_OBJECTID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:betesomraden"
+    ADD CONSTRAINT "sametinget:betesomraden_OBJECTID_key" UNIQUE ("OBJECTID");
+
+
+--
+-- Name: sametinget:betesomraden sametinget:betesomraden_SAMEBY_ID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:betesomraden"
+    ADD CONSTRAINT "sametinget:betesomraden_SAMEBY_ID_key" UNIQUE ("SAMEBY_ID");
+
+
+--
+-- Name: sametinget:betesomraden sametinget:betesomraden_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:betesomraden"
+    ADD CONSTRAINT "sametinget:betesomraden_pkey" PRIMARY KEY (ogc_fid);
+
+
+--
+-- Name: sametinget:flytled sametinget:flytled_GlobalID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:flytled"
+    ADD CONSTRAINT "sametinget:flytled_GlobalID_key" UNIQUE ("GlobalID");
+
+
+--
+-- Name: sametinget:flytled sametinget:flytled_OBJECTID_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:flytled"
+    ADD CONSTRAINT "sametinget:flytled_OBJECTID_key" UNIQUE ("OBJECTID");
+
+
+--
+-- Name: sametinget:flytled sametinget:flytled_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
+--
+
+ALTER TABLE ONLY postgis."sametinget:flytled"
+    ADD CONSTRAINT "sametinget:flytled_pkey" PRIMARY KEY (ogc_fid);
+
+
 --
 -- Name: sks:AvverkAnm sks:AvverkAnm_Beteckn_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import
 --
@@ -1340,6 +1666,34 @@ CREATE INDEX "mrr:olja_gas_diamant_approved_wkb_geometry_geom_idx" ON postgis."m
 CREATE INDEX "mrr:torvkoncessioner_wkb_geometry_geom_idx" ON postgis."mrr:torvkoncessioner" USING gist (wkb_geometry);
 
 
+--
+-- Name: ren:omr_riks_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "ren:omr_riks_wkb_geometry_geom_idx" ON postgis."ren:omr_riks" USING gist (wkb_geometry);
+
+
+--
+-- Name: ren:riks_ren_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "ren:riks_ren_wkb_geometry_geom_idx" ON postgis."ren:riks_ren" USING gist (wkb_geometry);
+
+
+--
+-- Name: sametinget:betesomraden_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "sametinget:betesomraden_wkb_geometry_geom_idx" ON postgis."sametinget:betesomraden" USING gist (wkb_geometry);
+
+
+--
+-- Name: sametinget:flytled_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
+--
+
+CREATE INDEX "sametinget:flytled_wkb_geometry_geom_idx" ON postgis."sametinget:flytled" USING gist (wkb_geometry);
+
+
 --
 -- Name: sks:AvverkAnm_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import
 --
@@ -1545,6 +1899,62 @@ GRANT SELECT ON TABLE postgis."mrr:torvkoncessioner" TO webmap_guest;
 GRANT SELECT,USAGE ON SEQUENCE postgis."mrr:torvkoncessioner_ogc_fid_seq" TO webmap_guest;
 
 
+--
+-- Name: TABLE "ren:omr_riks"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."ren:omr_riks" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "ren:omr_riks_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."ren:omr_riks_ogc_fid_seq" TO webmap_guest;
+
+
+--
+-- Name: TABLE "ren:riks_ren"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."ren:riks_ren" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "ren:riks_ren_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."ren:riks_ren_ogc_fid_seq" TO webmap_guest;
+
+
+--
+-- Name: TABLE "sametinget:betesomraden"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."sametinget:betesomraden" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "sametinget:betesomraden_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."sametinget:betesomraden_ogc_fid_seq" TO webmap_guest;
+
+
+--
+-- Name: TABLE "sametinget:flytled"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT ON TABLE postgis."sametinget:flytled" TO webmap_guest;
+
+
+--
+-- Name: SEQUENCE "sametinget:flytled_ogc_fid_seq"; Type: ACL; Schema: postgis; Owner: webmap_import
+--
+
+GRANT SELECT,USAGE ON SEQUENCE postgis."sametinget:flytled_ogc_fid_seq" TO webmap_guest;
+
+
 --
 -- Name: TABLE "sks:AvverkAnm"; Type: ACL; Schema: postgis; Owner: webmap_import
 --
-- 
cgit v1.2.3

