I files degli shape ci sono tutti vero? Se si' possono essere i permessi su alcuni di essi. Oppure il path scritto male. Oppure qualcosa che non va nel comando. Verifica sotto:
shp2pgsql -s -1 /path/file_da_importare.shp nome_tabella_da_creare_in_db nomedatabase > /path/file_sql.sql ciao Lia Eugenio Trumpy ha scritto: > Quella di cambiare sistema per me sarebbe la soluzione migliore, > personalmente ho migrato quasi per tutto :) > Putroppo però nell'ufficio dove sono già si storce il naso a sentir > parlare di linux & co. , già buono sia riuscito a metter su questo > piccolo server cartografico, che ancora purtroppo ha dei problemi :( > > Se provo ad importare da shell, usando questo comando (a proposito è > giusto?): > > [EMAIL PROTECTED]:~$ /usr/local/pgsql/bin/shp2pgsql -s -1 > /carto/musica/world_Project.shp world_project | > /usr/local/pgsql/bin/psql cartografia_base > > e questo è l'output: > > /carto/musica/world_Project.shp: shape (.shp) or index files (.shx) can > not be opened. > > > potrebbe sembrare un problema di permessi? > > Grazie > > Eugenio > > > >> From: Emilia Venturato <[EMAIL PROTECTED]> >> Reply-To: [EMAIL PROTECTED] >> To: Eugenio Trumpy <[EMAIL PROTECTED]> >> CC: [email protected] >> Subject: Re: [Gfoss] import shp to postgis >> Date: Mon, 30 Jul 2007 14:52:56 +0200 >> >> Cambia sistema operativo... :) >> A parte questo. >> Quando qualcosa non va prova con shp2pgsql invece che con lo spit di >> qgis. :) >> >> ciao >> lia >> >> Eugenio Trumpy ha scritto: >> > Purtroppo togliendo le maiuscole dal nome degli shp da importare non >> > sono riuscito a importare, mi continua a restituire il seguente output: >> > >> > Problema nell'inserimento di elementi dal file: >> > E:\GEODATI_GIS\world\world.shp >> > The database gave an error while executing this SQL: >> > alter table world drop constraint "$2" >> > The error was: >> > nstraint "$2" does not exist >> > >> > Altre idee? >> > >> > Eugenio >> > >> > >> >> From: Emilia Venturato <[EMAIL PROTECTED]> >> >> Reply-To: [EMAIL PROTECTED] >> >> To: Eugenio Trumpy <[EMAIL PROTECTED]> >> >> CC: [email protected] >> >> Subject: Re: [Gfoss] import shp to postgis >> >> Date: Mon, 30 Jul 2007 10:52:51 +0200 >> >> >> >> Prova a togliere le maiuscole dai nomi delle tabelle che vuoi creare. >> >> >> >> > relation "public.world_Project" does not exist >> >> >> >> In db e' molto meglio scrivere tutti i campi e i nomi tabella in >> >> minuscolo. >> >> Non so se sia solo quello ma sembrerebbe proprio di si'. >> >> Lia >> >> >> >> >> >> >> >> >> >> Eugenio Trumpy ha scritto: >> >> > Rinoltro la seguente mail, dato che non ho avuto risposta. >> >> > Alcuni file shp che provo ad importare tramite qgis in postgis mi >> danno >> >> > i seguenti output di errore: >> >> > >> >> > Problema nell'inserimento di elementi dal file: >> >> > E:\GEODATI_GIS\world\africa_asia_minore.shp >> >> > The database gave an error while executing this SQL: >> >> > alter table africa_asia_minore drop constraint "$2" >> >> > The error was: >> >> > nstraint "$2" does not exist >> >> > >> >> > Problema nell'inserimento di elementi dal file: >> >> > E:\GEODATI_GIS\world\world_Project.shp >> >> > The database gave an error while executing this SQL: >> >> > SELECT AddGeometryColumn('public', 'world_Project', 'the_geom', -1, >> >> > 'MULTIPOLYGON', 2) >> >> > The error was: >> >> > lation "public.world_Project" does not exist >> >> > CONTEXT: SQL statement "ALTER TABLE public."world_Project" ADD >> COLUMN >> >> > the_geom geometry " >> >> > PL/pgSQL function "addgeometrycolumn" line 86 at execute statement >> >> > SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , >> >> $6 )" >> >> > PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement >> >> > >> >> > Idea di come risolvere? >> >> > >> >> > Grazie >> >> > >> >> > Eugenio >> >> > >> >> > >> >> >> From: Emilia Venturato <[EMAIL PROTECTED]> >> >> >> Reply-To: [EMAIL PROTECTED] >> >> >> To: Eugenio Trumpy <[EMAIL PROTECTED]> >> >> >> CC: [email protected] >> >> >> Subject: Re: [Gfoss] import shp to postgis >> >> >> Date: Tue, 24 Jul 2007 15:51:16 +0200 >> >> >> >> >> >> A mano... >> >> >> nel modulo di spit mentre importi ti fa una tabellina con i dati >> dello >> >> >> shape che stai importando. >> >> >> E' editabile. >> >> >> Cambia il nome della tabella che vuoi creare (campo: 'nome nel db >> >> >> relazionale' se non ricordo male) togliendo il path e lasciando >> >> solo il >> >> >> nome che vuoi dare allo shape una volta che sei in postgis. >> >> >> Cosi' dovrebbe andare. >> >> >> :) >> >> >> >> >> >> ciao >> >> >> Lia >> >> >> >> >> >> Eugenio Trumpy ha scritto: >> >> >> > >> >> >> > Effettivamente utilizzo una macchian window. >> >> >> > Il sistema sarebbe così fatto: >> >> >> > un paio di client con win XP e il server con debian e >> >> >> postgresql/postgis a >> >> >> > cui i due client accedono. >> >> >> > Da uno dei due client tramite qgis (x win) vorrei importare i >> files >> >> >> shp nel >> >> >> > db. >> >> >> > Fermo restando che quindi il problema è dato da win e dal >> fatto che >> >> >> i dati >> >> >> > da importare risiedono proprio su win, come potrei ovviare il >> >> >> problema dei \ >> >> >> > e / ???? >> >> >> > >> >> >> > Grazie >> >> >> > Eugenio >> >> >> > >> >> >> > >> >> >> >> Message: 2 >> >> >> >> Date: Mon, 23 Jul 2007 19:15:55 +0200 >> >> >> >> From: strk <[EMAIL PROTECTED]> >> >> >> >> Subject: Re: [Gfoss] import shp to postgis >> >> >> >> To: Eugenio Trumpy <[EMAIL PROTECTED]> >> >> >> >> Cc: [email protected] >> >> >> >> Message-ID: <[EMAIL PROTECTED]> >> >> >> >> Content-Type: text/plain; charset=iso-8859-1 >> >> >> >> >> >> >> >> On Mon, Jul 23, 2007 at 03:55:13PM +0000, Eugenio Trumpy wrote: >> >> >> >>> Salve, >> >> >> >>> ho meso su un piccolo server di cartografia con >> >> postgresql/postgis. >> >> >> >>> Adeso sto cercando di importare alcuni shp all'interno del db >> >> >> tramite la >> >> >> >>> funzione che c'? su qgis, >> >> >> >>> putroppo ottengo il seguente errore: >> >> >> >>> >> >> >> >>> Problema nell'inserimento di elementi dal file: >> >> >> >>> E:\GEODATI_GIS\europa\countries.shp >> >> >> >>> The database gave an error while executing this SQL: >> >> >> >>> CREATE TABLE public.E:\\GEODATI_GIS\\europa\\countries(gid int4 >> >> >> PRIMARY >> >> >> >> KEY, >> >> >> >>> name varchar(40), area float, area_km2 float ) >> >> >> >>> The error was: >> >> >> >>> ntax error at or near ":" at character 22 >> >> >> >>> >> >> >> >>> Da che pu? dipendere? >> >> >> >> Dipende dal fatto che usi Windows. >> >> >> >> >> >> >> >> Se specifichi il nome della tabella da creare non ci dovrebbero >> >> >> >> essere problemi. Quello che vedi e' l'effetto dell'algoritmo >> >> >> >> che prova ad estrarre il nome della tabella dal nome del file, >> >> >> >> senza considerazione alcuna per sistemi che usano il backslash >> >> >> >> per separare le directory (per quale ragione poi, dal momento >> che >> >> >> >> il dos deriva dallo unix, Bill ha deciso di cambiare il verso >> agli >> >> >> >> slash ?!) >> >> >> >> >> >> >> >> --strk; >> >> >> > >> >> >> > _________________________________________________________________ >> >> >> > Calcio, Quiz, Sudoku, Scacchi… Inizia la sfida su Messenger, >> >> GRATIS! >> >> >> > http://www.messenger.it/giochi_e_attivita.html >> >> >> > >> >> >> > >> >> >> > _______________________________________________ >> >> >> > Gfoss mailing list: 235 iscritti (23-07-2007) >> >> >> > [email protected] >> >> >> > http://www.faunalia.com/cgi-bin/mailman/listinfo/gfoss >> >> >> > >> >> >> >> >> >> -- >> >> >> Emilia Venturato >> >> >> email+jabber: [EMAIL PROTECTED] >> >> >> www.faunalia.it >> >> >> Tel: (+39) 347-2770007 Tel+Fax: (+39) 0587-213742 >> >> >> Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy >> >> >> http://www.faunalia.it/ev >> >> > >> >> > _________________________________________________________________ >> >> > Crea il tuo Gadget e vinci Windows Vista >> >> http://concorsogadget.it.msn.com/ >> >> > >> >> > >> >> >> >> -- >> >> Emilia Venturato >> >> email+jabber: [EMAIL PROTECTED] >> >> www.faunalia.it >> >> Tel: (+39) 347-2770007 Tel+Fax: (+39) 0587-213742 >> >> Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy >> >> http://www.faunalia.it/ev >> > >> > _________________________________________________________________ >> > Windows Live Spaces: Crea il tuo blog e condividi le tue esperienze col >> > mondo! http://spaces.live.com/ >> > >> > >> >> -- >> Emilia Venturato >> email+jabber: [EMAIL PROTECTED] >> www.faunalia.it >> Tel: (+39) 347-2770007 Tel+Fax: (+39) 0587-213742 >> Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy >> http://www.faunalia.it/ev > > _________________________________________________________________ > Crea il tuo Gadget e vinci Windows Vista http://concorsogadget.it.msn.com/ > > -- Emilia Venturato email+jabber: [EMAIL PROTECTED] www.faunalia.it Tel: (+39) 347-2770007 Tel+Fax: (+39) 0587-213742 Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy http://www.faunalia.it/ev _______________________________________________ Gfoss mailing list: 235 iscritti (23-07-2007) [email protected] http://www.faunalia.com/cgi-bin/mailman/listinfo/gfoss
