[Gdal-dev] ntf to postgres tables

nida Khan nida at webstar.co.uk
Tue Dec 17 11:39:36 EST 2002


good idea! it works wonders! :).

I was able to import  all the files in the postgres, in that process I found
a weired thing though.

First time when I import into postgres it works fine, after that I drop the
table and asso. seq. and repeat the process, this time it fails with this
error

ogr2ogr -update PG:dbname=test temp/ -lco "LAUNDER=YES" -nln trynewlayer
BL2000_LINK
ERROR 1: AddGeometryColumn failed for layer trynewlayer, layer creation has
failed.
ERROR 1: Terminating translation prematurely after failed
translation of layer BL2000_LINK

now if I change the "layer name" from "trynewlayer" to "anotherlayer" it
works!!!!!!!!

I wonder what could cause this problem, is there some thing I'm doing
wrong??

Kind Regards
Nida.
----- Original Message -----
From: "Frank Warmerdam" <warmerdam at pobox.com>
To: <gdal-dev at remotesensing.org>
Sent: Tuesday, December 17, 2002 1:59 PM
Subject: Re: [Gdal-dev] ntf to postgres tables


> nida Khan wrote:
> > There is only one more thing I need to do, I've got more than one ntf
file
> > all with same layer definition, I want to import all of them in one
table.
>
> Nida,
>
> Use -update and -append.  The -update means open the datastore in update
> mode, and means the datastore type is detected from the datastore name
> (identified as PostGIS by the PG: prefix).  The -append implies
> that a layer should be appended to instead of created from scratch.
>
> However, the shorter approach to what you want is to just dump all the
> NTF files you want to load into one directory (with nothing else) and
> use the directory name as the input filename.  The NTF driver (and also
> the TIGER driver) will treat a whole directory full of files as a single
> seamless layer.
>
> Best regards,
>
> --
> ---------------------------------------+----------------------------------
----
> I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list