CookBook shptopostgres: import shape.bat

File import shape.bat, 2.0 KB (added by cedric, 15 years ago)

Command to import into ccm database (v Posgres 8.3)

Line 
1#----------------------------------------------------------------------------
2# script de création de la base à partir d'un batch command
3# @author cedric pour memo
4# attention compatibilité postgres 8.3 
5#---------------------------------------------------------------
6REM changement du répertoire de travail
7cd C:\Documents and Settings\cedric\Mes documents\Migrateur\eda\couches_SIG\coucheccm\CCM France
8REM  à partir du programme shp2pqsql création d'un fichier sql (ci dessous un exemple)
9REM C:\PostgresPlus\8.3\bin\shp2pgsql -?
10C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 CATCHMENTS catchments > catchments.sql
11C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f catchments.sql
12C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 COAST coast > coast.sql
13C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f coast.sql
14C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 ISLANDS islands > islands.sql
15C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f islands.sql
16C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 LAKES lakes > lakes.sql
17C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f lakes.sql
18C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 MAINRIVERS mainrivers > mainrivers.sql
19C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f mainrivers.sql
20C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 NAMEDRIVERS namedrivers > namedrivers.sql
21C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f namedrivers.sql
22C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 RIVERNODES rivernodes > rivernodes.sql
23C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f rivernodes.sql
24C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 RIVERSEGMENTS riversegments > riversegments.sql
25C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f riversegments.sql
26C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 SEAOUTLETS seaoutlets > seaoutlets.sql
27C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f seaoutlets.sql
28C:\PostgresPlus\8.3\bin\pg_dump -F c -U postgres -p 5432 CCM>CCM.dump