[gdal-dev] difference in -overwrite vs -lco OVERWRITE=YES

Donovan Cameron sault.don at gmail.com
Thu Dec 17 12:36:47 PST 2015

Hey List!*
*I'm having trouble tracking down an answer to a question, from either 
the archived mailing list or google, I have about ogr2ogr and loading 
data to PostGIS.
*Basically, what's the difference between the -overwrite flag and the 
layer creation option OVERWRITE for the PostgreSQL/PostGIS driver?*
*The descriptions are a little similar and I can't think of how they 
should be used differently.*
*For example, they say*:**

    Delete the output layer and recreate it empty
OVERWRITE*: This may be "YES" to force an existing layer of the desired 
name to be destroyed before creating the requested layer.*

*They either say they "delete" or "destroy" (is there a difference?) the 
layer prior to insert/copy but then one says "recreate it empty" which I 
can't see it producing an empty layer, and the other one says "creating 
the requested layer".

On another issue, I used to just use options like "-update -progress 
-unsetFid --config OGR_TRUNCATE YES -gt 65536" so that en existing table 
in the database could be updated without deleting VIEWS and user 
permissions. But unfortunately, one of the datasets I got recently has 
all the fields renamed so I have to get creative with the -fieldmap 
option or the new -addfields (but that means I have to delete the old 
redundant fields afterwards).

Kind regards,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151217/c9098843/attachment.html>

More information about the gdal-dev mailing list