wiki:BDCarthage

back to first page ..
back to Gis Structures

BDCarthage layer

http://sandre.eaufrance.fr/rubrique.php3?id_rubrique=17

2009 version of BDCarthage is available here : http://sandre.eaufrance.fr/spip.php?article862
http://sandre.eaufrance.fr/geonetwork/srv/fr/main.search?any=&themekey=BDCARTHAGE&similarity=1&sortBy=rating&hitsPerPage=11

http://services.sandre.eaufrance.fr/data/zonage/Hydrographie2010/arcgis/DC_BDCARTHAGE_3_0.pdf

Projection : RGF93_Lambert_93 (srid =2154)

Nomenclature

http://services.sandre.eaufrance.fr/data/zonage/Hydrographie2009/arcinfo/DL_BDCARTHAGE_3_0_ai.pdf

Download data !BdCarthage2010

http://services.sandre.eaufrance.fr/data/zonage/Hydrographie2010/arcgis/FranceEntiere/

Zone Hydro http://sandre.eaufrance.fr/geonetwork/srv/fr/metadata.show?id=707&currTab=simple

Put it in postgis

F:
cd F:\IAV\eda\couches_SIG\BD_carthage_2010\FranceEntiere
C:\"Program Files"\PostgreSQL\8.4\bin\psql -h 192.168.1.104 -p 5432 -U postgres -c "CREATE DATABASE bd_carthage2010  WITH OWNER = postgres  template=postgis;"
C:\"Program Files"\PostgreSQL\8.4\bin\psql -h 192.168.1.104 -p 5432 -U postgres -c "COMMENT ON DATABASE bd_carthage2010 IS 'database bd_carthage2010 reprojettee en lambert II'" 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I COURS_D_EAU COURS_D_EAU> COURS_D_EAU.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f COURS_D_EAU.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I HYDROGRAPHIE_SURFACIQUE HYDROGRAPHIE_SURFACIQUE> HYDROGRAPHIE_SURFACIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f HYDROGRAPHIE_SURFACIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I LAISSE LAISSE> LAISSE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f LAISSE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I NOEUD_HYDROGRAPHIQUE NOEUD_HYDROGRAPHIQUE> NOEUD_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f NOEUD_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I POINT_EAU_ISOLE POINT_EAU_ISOLE> POINT_EAU_ISOLE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f POINT_EAU_ISOLE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I REGION_HYDROGRAPHIQUE REGION_HYDROGRAPHIQUE> REGION_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f REGION_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I SECTEUR SECTEUR> SECTEUR.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f SECTEUR.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I SOUS_SECTEUR SOUS_SECTEUR> SOUS_SECTEUR.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f SOUS_SECTEUR.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I TRONCON_HYDROGRAPHIQUE TRONCON_HYDROGRAPHIQUE> TRONCON_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f TRONCON_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I ZONE_HYDROGRAPHIQUE ZONE_HYDROGRAPHIQUE> ZONE_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f ZONE_HYDROGRAPHIQUE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 27572 -c -g the_geom -W LATIN1 -I POINT_EAU_ISOLE POINT_EAU_ISOLE> POINT_EAU_ISOLE.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d bd_carthage2010 -U postgres -h 192.168.1.104 -p 5432 -f POINT_EAU_ISOLE.sql 

Reprojecting

-- les projections n'étaient pas en 3035, erreur ci dessus que je corrige
alter table COURS_D_EAU drop constraint enforce_srid_the_geom ;
alter table HYDROGRAPHIE_SURFACIQUE drop constraint enforce_srid_the_geom ;
alter table LAISSE drop constraint enforce_srid_the_geom ;
alter table NOEUD_HYDROGRAPHIQUE drop constraint enforce_srid_the_geom ;
alter table POINT_EAU_ISOLE  drop constraint enforce_srid_the_geom ;
alter table REGION_HYDROGRAPHIQUE drop constraint enforce_srid_the_geom ;
alter table SECTEUR drop constraint enforce_srid_the_geom ;
alter table SOUS_SECTEUR drop constraint enforce_srid_the_geom ;
alter table TRONCON_HYDROGRAPHIQUE drop constraint enforce_srid_the_geom ;
alter table ZONE_HYDROGRAPHIQUE drop constraint enforce_srid_the_geom ;

update COURS_D_EAU set the_geom=ST_Transform(the_geom,3035);
update HYDROGRAPHIE_SURFACIQUE set the_geom=ST_Transform(the_geom,3035);
update LAISSE set the_geom=ST_Transform(the_geom,3035);
update NOEUD_HYDROGRAPHIQUE set the_geom=ST_Transform(the_geom,3035);
update POINT_EAU_ISOLE set the_geom=ST_Transform(the_geom,3035);
update SECTEUR set the_geom=ST_Transform(the_geom,3035);
update SOUS_SECTEUR set the_geom=ST_Transform(the_geom,3035);
update TRONCON_HYDROGRAPHIQUE set the_geom=ST_Transform(the_geom,3035);
update ZONE_HYDROGRAPHIQUE set the_geom=ST_Transform(the_geom,3035);

alter table COURS_D_EAU add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table HYDROGRAPHIE_SURFACIQUE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table LAISSE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table NOEUD_HYDROGRAPHIQUE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table POINT_EAU_ISOLE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table REGION_HYDROGRAPHIQUE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table LAISSE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table SECTEUR add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table SOUS_SECTEUR add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table TRONCON_HYDROGRAPHIQUE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);
alter table ZONE_HYDROGRAPHIQUE add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);

Reprojecting lambert II

alter table laisse drop constraint enforce_srid_the_geom ;
update laisse set the_geom=ST_SetSRID(the_geom, 2154);
update hylcov_arc set the_geom=ST_Transform(the_geom,27572);
alter table hylcov_node add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table cours_d_eau drop constraint enforce_srid_the_geom ;
update cours_d_eau set the_geom=ST_SetSRID(the_geom, 2154);
update cours_d_eau set the_geom=ST_Transform(the_geom,27572);
alter table cours_d_eau add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table hydrographie_surfacique drop constraint enforce_srid_the_geom ;
update hydrographie_surfacique set the_geom=ST_SetSRID(the_geom, 2154);
update hydrographie_surfacique set the_geom=ST_Transform(the_geom,27572);
alter table hydrographie_surfacique add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table noeud_hydrographique drop constraint enforce_srid_the_geom ;
update noeud_hydrographique set the_geom=ST_SetSRID(the_geom, 2154);
update noeud_hydrographique set the_geom=ST_Transform(the_geom,27572);
alter table noeud_hydrographique add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table region_hydrographique drop constraint enforce_srid_the_geom ;
update region_hydrographique set the_geom=ST_SetSRID(the_geom, 2154);
update region_hydrographique set the_geom=ST_Transform(the_geom,27572);
alter table region_hydrographique add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table point_eau_isole drop constraint enforce_srid_the_geom ;
update point_eau_isole set the_geom=ST_SetSRID(the_geom, 2154);
update point_eau_isole set the_geom=ST_Transform(the_geom,27572);
alter table point_eau_isole add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table secteur drop constraint enforce_srid_the_geom ;
update secteur set the_geom=ST_SetSRID(the_geom, 2154);
update secteur set the_geom=ST_Transform(the_geom,27572);
alter table secteur add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table sous_secteur drop constraint enforce_srid_the_geom ;
update sous_secteur set the_geom=ST_SetSRID(the_geom, 2154);
update sous_secteur set the_geom=ST_Transform(the_geom,27572);
alter table sous_secteur add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

alter table troncon_hydrographique drop constraint enforce_srid_the_geom ;
update troncon_hydrographique set the_geom=ST_SetSRID(the_geom, 2154);
update troncon_hydrographique set the_geom=ST_Transform(the_geom,27572);
alter table troncon_hydrographique add constraint enforce_srid_the_geom CHECK (st_srid(the_geom) = 27572);

Download BDCarthage2011

New version from July 28th
http://services.sandre.eaufrance.fr/data/zonage/Hydrographie2011/arcgis/FranceEntiere/

Last modified 14 years ago Last modified on Sep 6, 2011 4:57:50 PM