diff options
| -rw-r--r-- | config.yml | 28 | ||||
| -rw-r--r-- | layers/custom/gigafactories.geojson | 454 | ||||
| -rw-r--r-- | schema.sql | 78 | ||||
| -rwxr-xr-x | webmap-publish | 2 | 
4 files changed, 562 insertions, 0 deletions
@@ -68,6 +68,8 @@ layer-groups:    mrr: 'mrr:*'    ri: 'ri:*'    svk: 'svk:*' +  misc: +    - gigafactories  # Global GDAL/OGR configuration options, cf. https://gdal.org/user/configoptions.html and @@ -3967,6 +3969,7 @@ layers:          transform-geometry: centroid          maxzoom: 6        stationsomraden: +        target_name: stationer          minzoom: 7    'svk:transmissionsnatsprojekt': @@ -3992,3 +3995,28 @@ layers:          'voltage': Voltage          'url': Url      publish: transmissionsnatsprojekt + +  'gigafactories': +    description: Stora industrisatsningar +    create: +      geometry-type: MULTIPOLYGON +      fields: +        - name: Name +          type: String +          width: 254 +        - name: Url +          type: String +          width: 254 +    import: +      path: custom/gigafactories.geojson +      format: GeoJSON +      field-map: +        'name': Name +        'url': Url +    publish: +      gigafactories_points: +        transform-geometry: centroid +        target_name: gigafactories +        maxzoom: 5 +      gigafactories: +        minzoom: 6 diff --git a/layers/custom/gigafactories.geojson b/layers/custom/gigafactories.geojson new file mode 100644 index 0000000..d30282e --- /dev/null +++ b/layers/custom/gigafactories.geojson @@ -0,0 +1,454 @@ +{ +  "type": "FeatureCollection", +  "name": "Gigafactories", +  "crs": { +    "type": "name", +    "properties": { +      "name": "urn:ogc:def:crs:EPSG::3006" +    } +  }, +  "features": [ +    { +      "type": "Feature", +      "properties": { +        "name": "H₂GS", +        "url": "https://www.h2greensteel.com/boden" +      }, +      "geometry": { +        "type": "Polygon", +        "coordinates": [ +          [ +            [ +              811010.34, +              7316409.28 +            ], +            [ +              811200.84, +              7316636.82 +            ], +            [ +              812116.3, +              7315520.28 +            ], +            [ +              811899.34, +              7315340.36 +            ], +            [ +              812174.51, +              7314869.4 +            ], +            [ +              812026.34, +              7314790.03 +            ], +            [ +              812042.22, +              7314430.19 +            ], +            [ +              812412.63, +              7314387.86 +            ], +            [ +              812433.8, +              7314144.44 +            ], +            [ +              811909.92, +              7313387.74 +            ], +            [ +              810560.55, +              7314123.28 +            ], +            [ +              808406.84, +              7313160.19 +            ], +            [ +              807999.38, +              7313033.19 +            ], +            [ +              807909.42, +              7312842.69 +            ], +            [ +              807925.3, +              7312657.49 +            ], +            [ +              807845.92, +              7312625.74 +            ], +            [ +              807803.59, +              7312821.53 +            ], +            [ +              807687.17, +              7313313.65 +            ], +            [ +              807729.51, +              7313361.28 +            ], +            [ +              807888.26, +              7313117.86 +            ], +            [ +              808105.22, +              7313202.53 +            ], +            [ +              808121.09, +              7313276.61 +            ], +            [ +              808179.3, +              7313303.07 +            ], +            [ +              808237.51, +              7313313.65 +            ], +            [ +              808322.17, +              7313361.28 +            ], +            [ +              808459.76, +              7313541.19 +            ], +            [ +              808602.63, +              7313721.11 +            ], +            [ +              808708.47, +              7313996.28 +            ], +            [ +              808809.01, +              7313959.24 +            ], +            [ +              808655.55, +              7313557.07 +            ], +            [ +              808787.84, +              7313498.86 +            ], +            [ +              808941.3, +              7313488.28 +            ], +            [ +              809227.05, +              7313583.53 +            ], +            [ +              809528.67, +              7313736.99 +            ], +            [ +              809761.51, +              7313953.94 +            ], +            [ +              809877.92, +              7314155.03 +            ], +            [ +              809856.76, +              7314223.82 +            ], +            [ +              809946.72, +              7314282.03 +            ], +            [ +              810004.92, +              7314239.69 +            ], +            [ +              810137.22, +              7314340.24 +            ], +            [ +              809586.88, +              7315112.82 +            ], +            [ +              809629.22, +              7315160.44 +            ], +            [ +              809555.13, +              7315340.36 +            ], +            [ +              809375.22, +              7315557.32 +            ], +            [ +              809073.59, +              7315901.28 +            ], +            [ +              809787.97, +              7316732.07 +            ], +            [ +              810126.63, +              7315906.57 +            ], +            [ +              810084.3, +              7315869.53 +            ], +            [ +              810211.3, +              7315811.32 +            ], +            [ +              810809.26, +              7316271.69 +            ], +            [ +              810698.13, +              7316398.69 +            ], +            [ +              810915.09, +              7316525.69 +            ], +            [ +              811010.34, +              7316409.28 +            ] +          ] +        ] +      } +    }, +    { +      "type": "Feature", +      "properties": { +        "name": "LKAB Vitåfors", +        "url": "https://www.hybritdevelopment.se/media/lkab-vitafors/" +      }, +      "geometry": { +        "type": "Polygon", +        "coordinates": [ +          [ +            [ +              745818.77, +              7466085.83 +            ], +            [ +              746369.11, +              7465890.04 +            ], +            [ +              746416.73, +              7465456.12 +            ], +            [ +              746676.02, +              7465614.87 +            ], +            [ +              746829.48, +              7465561.96 +            ], +            [ +              746914.15, +              7465450.83 +            ], +            [ +              746803.02, +              7465397.92 +            ], +            [ +              746638.98, +              7465392.62 +            ], +            [ +              746474.94, +              7465350.29 +            ], +            [ +              746829.48, +              7465053.96 +            ], +            [ +              746967.06, +              7465159.79 +            ], +            [ +              747146.98, +              7465059.25 +            ], +            [ +              747094.06, +              7464916.37 +            ], +            [ +              747258.11, +              7464762.92 +            ], +            [ +              747422.15, +              7464630.62 +            ], +            [ +              747649.69, +              7464186.12 +            ], +            [ +              747109.94, +              7463948.0 +            ], +            [ +              746670.73, +              7464424.25 +            ], +            [ +              746744.81, +              7464657.08 +            ], +            [ +              746443.19, +              7464815.83 +            ], +            [ +              746157.44, +              7465064.54 +            ], +            [ +              746093.94, +              7464979.87 +            ], +            [ +              745945.77, +              7465122.75 +            ], +            [ +              746003.98, +              7465239.17 +            ], +            [ +              745744.69, +              7465540.79 +            ], +            [ +              745474.81, +              7465249.75 +            ], +            [ +              745633.56, +              7465096.29 +            ], +            [ +              745633.56, +              7464979.87 +            ], +            [ +              745543.61, +              7464942.83 +            ], +            [ +              745411.31, +              7464937.54 +            ], +            [ +              745136.15, +              7464964.0 +            ], +            [ +              744892.73, +              7464863.46 +            ], +            [ +              744765.73, +              7465069.83 +            ], +            [ +              745279.02, +              7465419.08 +            ], +            [ +              745321.36, +              7465313.25 +            ], +            [ +              745818.77, +              7466085.83 +            ] +          ] +        ] +      } +    }, +    { +      "type": "Feature", +      "properties": { +        "name": "Northvolt", +        "url": "https://northvolt.com/career/locations/skelleftea/" +      }, +      "geometry": { +        "type": "Polygon", +        "coordinates": [ +          [ +            [ +              788969.67, +              7193414.19 +            ], +            [ +              790274.06, +              7192948.52 +            ], +            [ +              790414.29, +              7192816.23 +            ], +            [ +              790467.21, +              7192713.04 +            ], +            [ +              790464.56, +              7192260.6 +            ], +            [ +              790334.92, +              7192255.31 +            ], +            [ +              790340.21, +              7192567.52 +            ], +            [ +              790141.77, +              7192662.77 +            ], +            [ +              789932.75, +              7192088.62 +            ], +            [ +              788657.46, +              7192612.5 +            ], +            [ +              788969.67, +              7193414.19 +            ] +          ] +        ] +      } +    } +  ] +} @@ -74,6 +74,48 @@ SET default_tablespace = '';  SET default_table_access_method = heap;  -- +-- Name: gigafactories; Type: TABLE; Schema: postgis; Owner: webmap_import +-- + +CREATE TABLE postgis.gigafactories ( +    ogc_fid bigint NOT NULL, +    "Name" character varying(254), +    "Url" character varying(254), +    wkb_geometry postgis.geometry(MultiPolygon,3006) +); + + +ALTER TABLE postgis.gigafactories OWNER TO webmap_import; + +-- +-- Name: TABLE gigafactories; Type: COMMENT; Schema: postgis; Owner: webmap_import +-- + +COMMENT ON TABLE postgis.gigafactories IS 'Stora industrisatsningar'; + + +-- +-- Name: gigafactories_ogc_fid_seq; Type: SEQUENCE; Schema: postgis; Owner: webmap_import +-- + +CREATE SEQUENCE postgis.gigafactories_ogc_fid_seq +    START WITH 1 +    INCREMENT BY 1 +    NO MINVALUE +    NO MAXVALUE +    CACHE 1; + + +ALTER TABLE postgis.gigafactories_ogc_fid_seq OWNER TO webmap_import; + +-- +-- Name: gigafactories_ogc_fid_seq; Type: SEQUENCE OWNED BY; Schema: postgis; Owner: webmap_import +-- + +ALTER SEQUENCE postgis.gigafactories_ogc_fid_seq OWNED BY postgis.gigafactories.ogc_fid; + + +--  -- Name: kommunyta; Type: TABLE; Schema: postgis; Owner: webmap_import  -- @@ -2642,6 +2684,13 @@ ALTER SEQUENCE postgis."vbk:vindkraftverk_ogc_fid_seq" OWNED BY postgis."vbk:vin  -- +-- Name: gigafactories ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import +-- + +ALTER TABLE ONLY postgis.gigafactories ALTER COLUMN ogc_fid SET DEFAULT nextval('postgis.gigafactories_ogc_fid_seq'::regclass); + + +--  -- Name: kommunyta ogc_fid; Type: DEFAULT; Schema: postgis; Owner: webmap_import  -- @@ -2999,6 +3048,14 @@ ALTER TABLE ONLY postgis."vbk:vindkraftverk" ALTER COLUMN ogc_fid SET DEFAULT ne  -- +-- Name: gigafactories gigafactories_pkey; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import +-- + +ALTER TABLE ONLY postgis.gigafactories +    ADD CONSTRAINT gigafactories_pkey PRIMARY KEY (ogc_fid); + + +--  -- Name: kommunyta kommunyta_kommunkod_key; Type: CONSTRAINT; Schema: postgis; Owner: webmap_import  -- @@ -3871,6 +3928,13 @@ ALTER TABLE ONLY postgis."vbk:vindkraftverk"  -- +-- Name: gigafactories_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import +-- + +CREATE INDEX gigafactories_wkb_geometry_geom_idx ON postgis.gigafactories USING gist (wkb_geometry); + + +--  -- Name: kommunyta_wkb_geometry_geom_idx; Type: INDEX; Schema: postgis; Owner: webmap_import  -- @@ -4258,6 +4322,20 @@ GRANT SELECT ON TABLE postgis.geometry_columns TO webmap_guest;  -- +-- Name: TABLE gigafactories; Type: ACL; Schema: postgis; Owner: webmap_import +-- + +GRANT SELECT ON TABLE postgis.gigafactories TO webmap_guest; + + +-- +-- Name: SEQUENCE gigafactories_ogc_fid_seq; Type: ACL; Schema: postgis; Owner: webmap_import +-- + +GRANT SELECT,USAGE ON SEQUENCE postgis.gigafactories_ogc_fid_seq TO webmap_guest; + + +--  -- Name: TABLE kommunyta; Type: ACL; Schema: postgis; Owner: webmap_import  -- diff --git a/webmap-publish b/webmap-publish index f3c6c5d..a33d56e 100755 --- a/webmap-publish +++ b/webmap-publish @@ -491,6 +491,8 @@ if __name__ == '__main__':          elif isinstance(exportdef, list):              exportdef = { l:{} for l in exportdef }          for export_layername, export_layerdef in exportdef.items(): +            if 'target_name' in export_layerdef: +                export_layername = export_layerdef.pop('target_name')              if export_layername not in export_layers:                  export_layers[export_layername] = []              export_layers[export_layername].append(export_layerdef)  | 
