Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am able to successfully run ogr2ogr to add S57 data to PostgresDB. The version I use is GDAL 1.7.0b2, FWTools 2.4.7 and release date 2010/01/19

I upgraded my version to GDAL 1.9.1 and release date 2012/05/16. When I run ogr2ogr on the same files, I get an error as follows

ERROR 1: Layer dsid already exists, CreateLayer failed.
Use the layer creation option OVERWRITE=YES to replace it.
ERROR 1: Terminating translation prematurely after failed
translation of layer DSID (use -skipfailures to skip errors)

Why would this happen when all things being equal? Is the latest version buggy?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

It would appear that GDAL 1.9.1 (note that 1.9.2 is out now) does not allow creating on top of an existing layer. Perhaps the older version was more permissive.

Why not just try adding -lco OVERWRITE=YES to your ogr2ogr command if you don't mind replacing your existing tables in Postgres?

share|improve this answer
    
Thanks Frank. That seem to work without errors (but lots of warnings though). My database needs to get refreshed periodically based on S57 updates, so a complete overwrite is not a concern. –  Ramesh Elaiyavalli Oct 29 '12 at 15:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.