[Gdal-dev] ntf to postgres tables
nida Khan
nida at webstar.co.uk
Tue Dec 17 06:35:57 EST 2002
Great! U r a *.
It works just fine :), once again thank you for your input, I really
appreciate your help...
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.
When I use -append option it says
ogr2ogr -append PG:dbname=test Unitary_Authority/CAERDYDD_-_CARDIFF.NTF -lco
"LAUNDER=YES" -nln wrecsam_collections BL2000_COLLECTIONS
ERROR 1: Failed to create directory PG:dbname=test
for shapefile datastore.
and when I use -update
ogr2ogr -update PG:dbname=test Unitary_Authority/CAERDYDD_-_CARDIFF.NTF -lco
"LAUNDER=YES" -nln wrecsam_collections BL2000_COLLECTIONS
ERROR 1: Layer wrecsam_collections already exists, CreateLayer failed.
Use the layer creation option OVERWRITE=YES to replace it.
ERROR 1: Terminating translation prematurely after failed
translation of layer BL2000_COLLECTIONS
I dont want to overwrite the layer...
Any idea?
Kind Regards
Nida.
> nida Khan wrote:
> > I tried as you suggested, but again I'm getting same error...
> > For Chreshire ntf file it said it can not open with any drivers
> >
> > bash-2.05a$ ogr2ogr PG:dbname=test -lco "LAUNDER=YES"
CHRESHIRE_COUNTY.NTF
> > FAILURE:
>
> This is because the filename was spelled improperly.
>
> > so I tried it with another ntf file.
> >
> > bash-2.05a$ ogr2ogr -update PG:dbname=test -lco "LAUNDER=YES"
TQ3281SE.NTF
> > ERROR 1: AddGeometryColumn failed for layer LANDLINE99_POINT, layer
creation
> > has failed.
> > ERROR 1: Terminating translation prematurely after failed
> > translation of layer LANDLINE99_POINT
> >
> > bash-2.05a$ ogrinfo TQ3281SE.NTF
> > ERROR 4: NTF Driver doesn't support update.
> > Had to open data source read-only.
> > INFO: Open of `TQ3281SE.NTF'
> > using driver `UK .NTF' successful.
> > 1: LANDLINE99_POINT (Point)
> > 2: LANDLINE99_LINE (Line String)
> > 3: LANDLINE99_NAME (Point)
> > 4: FEATURE_CLASSES (None)
>
> OK, it turns out my previous assumptions were wrong. The LAUNDER flag
only
> "launders" the field names, not the layer names. You have to rename the
> layers yourself:
>
> ogr2ogr -update PG:dbname=test CHESHIRE_COUNTY.NTF \
> -lco "LAUNDER=YES" -nln bl2000_link BL2000_LINK
>
> you will have to do a separate ogr2ogr command for each layer you want to
> translate. The "-nln" flag gives a name for the layer in the target
> dataset.
>
> Good luck,
>
> --
> ---------------------------------------+----------------------------------
----
> 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