| 1 | == CookBook == |
| 2 | |
| 3 | In this section we will report "how to" procedures to do the differents tasks in EDA |
| 4 | |
| 5 | == How to create a postgres database from a shape file" |
| 6 | |
| 7 | Il faut d'abord ouvrir un batch de commande exécuter> cmd |
| 8 | Changer de répertoire de travail pour atteindre le fichier à importer |
| 9 | {{{ |
| 10 | cd C:\Documents and Settings\cedric\Mes documents\Migrateur\eda\w2000a18 |
| 11 | }}} |
| 12 | Dans PgAdmin, se connecter au serveur |
| 13 | > clic droit creation d'une base de donnee |
| 14 | PgAmin_create_gis_database.jpg |
| 15 | #* à partir du programme shp2pqsql création d'un fichier sql (ci dessous un exemple) |
| 16 | C:\PostgresPlus\8.3\bin\shp2pgsql -? |
| 17 | C:\PostgresPlus\8.3\bin\shp2pgsql -s 26986 TOWNS_POLY towns > towns.sql |
| 18 | C:\PostgresPlus\8.3\bin\shp2pgsql -s 3035 CATCHMENT_W catchment_w > catchment_w.sql |
| 19 | |
| 20 | |
| 21 | C:\PostgresPlus\8.3\bin\psql -d CCM -h localhost -U postgres -f catchment_w.sql |