Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --CREATE ALIAS IF NOT EXISTS H2GIS_NETWORK FOR "org.h2gis.network.functions.NetworkFunctions.load"; CALL H2GIS_NETWORK();
- --create SPATIAL INDEX ON "GIS.OSM_ROADS_FREE_1" (the_geom);
- --create table routes_vannes as select ST_TRANSFORM(ST_SETSRID(ST_INTERSECTION(a.the_geom, b.the_geom), 4326), 2154) as the_geom, MAXSPEED, PK, fclass from "GIS.OSM_ROADS_FREE_1" as a, FENCE as b where a.the_geom && b.the_geom and ST_INTERSECTS (a.the_geom, b.the_geom);
- -- il y a des multistring donc on explose la couche initiale
- --create table routes_vannes_dec as select * from st_explode ('ROUTES_VANNES')
- -- il faut créer une clé primaire parce qu'on a décomposé la couche et on a besoin d'un identifiant unique avant de lancer la fonction pour le graphe (le PK est obsolète)
- --alter table ROUTEs_VANNES_DEC add column id serial;
- --alter table ROUTEs_VANNES_DEC ADD primary key (id);
- --alter table ROUTEs_VANNES_DEC ALTER COLUMN the_geom LINESTRING
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement