wiki:European WISE layers Download and load

Version 7 (modified by cedric, 15 years ago) (diff)

--

back to first page ..
back to ["UGA]

Data in ETRS1989 LAEA srid=3035

d:
cd D:\CelineJouanin\European WISE\wise_coastal_waters_shp
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -W LATIN1 -I Coastal_waters.shp costal_waters > costal_waters.sql 
cd D:\CelineJouanin\European WISE\wise_rbds_f1v3_shp
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -W LATIN1 -I RBD_F1v3.shp RDB_F1v3 > RBD_F1v3.sql
cd D:\CelineJouanin\European WISE\wise_transitional_waters_shp
C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -W LATIN1 -I Transitional_waters.shp transitional_waters > transitional_waters.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 OR
  • using -W LATIN1, just change the first line to SET CLIENT_ENCODING TO LATIN1;
    Encodage>convertir en utf8
    

And save the file as : transitional_watersutf8

--Céline
d:
cd D:\CelineJouanin\European WISE
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5432 -f costal_watersutf8.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5432 -f RBD_F1v3utf8.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5432 -f transitional_watersutf8.sql

--Cédric
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5433 -f costal_waters.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5433 -f RBD_F1v3.sql 
C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0 -h localhost -U postgres -p 5433 -f transitional_waters.sql
  • Create schema european_wise2008 et changement de schéma des tables (qui sont sous public)
    --- In sql editor 
    CREATE SCHEMA european_wise2008;
    ALTER TABLE costal_waters SET SCHEMA european_wise;
    ALTER TABLE RBD_F1v3 SET SCHEMA european_wise;
    ALTER TABLE transitional_waters SET SCHEMA european_wise;
    
  • Changement du type de projection : RGF93_Lambert_93 (srid 2154) --> ETRS1989-LAEA (srid 3035)
    ALTER TABLE uga2010.uga DROP CONSTRAINT enforce_srid_the_geom;
    UPDATE uga2010.uga SET the_geom = ST_transform(the_geom, 3035); 
    ALTER TABLE uga2010.uga ADD CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035);