[Gfoss] import shp to postgis

Emilia Venturato venturato at faunalia.it
Mon Jul 30 14:52:56 CEST 2007


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 <venturato a faunalia.it>
>> Reply-To: venturato a faunalia.it
>> To: Eugenio Trumpy <frippe12573 a hotmail.com>
>> CC: gfoss a faunalia.com
>> 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 <venturato a faunalia.it>
>> >> Reply-To: venturato a faunalia.it
>> >> To: Eugenio Trumpy <frippe12573 a hotmail.com>
>> >> CC: gfoss a faunalia.com
>> >> 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 <strk a keybit.net>
>> >> >> Subject: Re: [Gfoss] import shp to postgis
>> >> >> To: Eugenio Trumpy <frippe12573 a hotmail.com>
>> >> >> Cc: gfoss a faunalia.com
>> >> >> Message-ID: <20070723171555.GD77248 a keybit.net>
>> >> >> 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)
>> >> > Gfoss a faunalia.com
>> >> > http://www.faunalia.com/cgi-bin/mailman/listinfo/gfoss
>> >> >
>> >>
>> >> --
>> >> Emilia Venturato
>> >> email+jabber: venturato a faunalia.it
>> >> 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: venturato a faunalia.it
>> 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: venturato a faunalia.it
www.faunalia.it
Tel: (+39) 347-2770007 Tel+Fax: (+39) 0587-213742
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy
http://www.faunalia.it/ev



More information about the Gfoss mailing list