wiki:Download and load ROEversion2

Version 2 (modified by celine, 14 years ago) (diff)

--

back to first page..
back toObstacle pressure

Download and load ROE version2

--Celine
d:
cd D:\CelineJouanin\ROE2011\donnee_obstacles_ecoulement_V2\ROE\shp
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 4019 -c -g the_geom -W LATIN1 -I ROE_v2.shp roe_v2 > roe_v2.sql 
We have to convert it into utf8 (as the database is posgis), in notepad, open the uga.sql file and convert it to utf8
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5432 -f roe_v2utf8.sql 

--Creation du schema rht
CREATE SCHEMA geobs2011;
ALTER TABLE roe_v2 SET SCHEMA geobs2011;

--Changement du type de projection : GCS_GRS 1980(IUGG, 1980)  (srid 4019) --> ETRS1989-LAEA (srid 3035)
ALTER TABLE geobs2011.roe_v2 DROP CONSTRAINT enforce_srid_the_geom;
UPDATE geobs2011.roe_v2 SET the_geom = ST_transform(the_geom, 3035);
ERREUR:  transform: couldn't project point (830058 6.87542e+006 0): latitude or longitude exceeded limits (-14)

********** Erreur ********** 
ALTER TABLE geobs2011.roe_v2 ADD CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);