nouvelle couche osm_municipalities

This commit is contained in:
Maël 2020-02-15 15:41:43 +01:00
parent e790659159
commit 4f50bbafde
2 changed files with 2340 additions and 13 deletions

View file

@ -199,7 +199,7 @@ CREATE VIEW phase_2_pk_secteur_4326 AS
ALTER TABLE phase_2_pk_secteur_4326 OWNER to redadeg;
-- les polygones des communes
-- les polygones des communes source OSM France
DROP TABLE IF EXISTS osm_communes CASCADE ;
CREATE TABLE osm_communes
(
@ -217,18 +217,35 @@ CREATE INDEX osm_communes_geom_idx ON osm_communes USING gist(the_geom);
ALTER TABLE osm_communes OWNER to redadeg;
/*
INSERT INTO osm_communes
SELECT
gid,
insee,
nom,
wikipedia,
surf_ha,
ST_Transform(ST_SetSRID(geom,4326),2154) AS the_geom
FROM osm_communes_4326
ORDER BY insee ASC ;
*/
-- la couche avec les info langue minoritaire
DROP TABLE IF EXISTS osm_municipalities CASCADE ;
CREATE TABLE osm_municipalities
(
id serial,
osm_id bigint,
type text,
admin_level text,
name text,
name_fr text,
name_br text,
source_name_br text,
admincode text,
postcode text,
wikidata text,
surf_ha numeric,
x numeric,
y numeric,
the_geom geometry,
CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POLYGON'::text OR geometrytype(the_geom) = 'MULTIPOLYGON'::text),
CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154),
CONSTRAINT osm_municipalities_pkey PRIMARY KEY (id)
);
CREATE INDEX osm_municipalities_geom_idx ON osm_municipalities USING gist(the_geom);
CREATE INDEX osm_municipalities_admincode_idx ON osm_municipalities(admincode);
ALTER TABLE osm_municipalities OWNER to redadeg;
-- la couche qui contient les lignes des routes venant de OSM

File diff suppressed because it is too large Load diff