[Gdal-dev] ntf to postgres tables
Frank Warmerdam
warmerdam at pobox.com
Tue Dec 17 12:06:55 EST 2002
nida Khan wrote:
> 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
Nida,
I believe the problem is that though you dropped the table, the table still
appeared in the geometry_columns metadata table and thus an attempt to add it
again with the same name failed. If you read the SQL docs you will see
a DropGeometryColumn() function or something similar you can invoke to
clean a value out of the geometry_columns table.
Instead of dropping the table yourself, you can use the "OVERWRITE=YES" layer
creation option, and ogr2ogr will take care of getting rid of all aspects of
the old layer itself.
Best regard,
--
---------------------------------------+--------------------------------------
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
More information about the Gdal-dev
mailing list