nouvelle couche osm_municipalities
This commit is contained in:
parent
e790659159
commit
4f50bbafde
|
@ -199,7 +199,7 @@ CREATE VIEW phase_2_pk_secteur_4326 AS
|
||||||
ALTER TABLE phase_2_pk_secteur_4326 OWNER to redadeg;
|
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 ;
|
DROP TABLE IF EXISTS osm_communes CASCADE ;
|
||||||
CREATE TABLE osm_communes
|
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;
|
ALTER TABLE osm_communes OWNER to redadeg;
|
||||||
|
|
||||||
|
|
||||||
/*
|
-- la couche avec les info langue minoritaire
|
||||||
INSERT INTO osm_communes
|
DROP TABLE IF EXISTS osm_municipalities CASCADE ;
|
||||||
SELECT
|
CREATE TABLE osm_municipalities
|
||||||
gid,
|
(
|
||||||
insee,
|
id serial,
|
||||||
nom,
|
osm_id bigint,
|
||||||
wikipedia,
|
type text,
|
||||||
surf_ha,
|
admin_level text,
|
||||||
ST_Transform(ST_SetSRID(geom,4326),2154) AS the_geom
|
name text,
|
||||||
FROM osm_communes_4326
|
name_fr text,
|
||||||
ORDER BY insee ASC ;
|
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
|
-- la couche qui contient les lignes des routes venant de OSM
|
||||||
|
|
2310
scripts/load_osm_municipalities.fmw
Normal file
2310
scripts/load_osm_municipalities.fmw
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue