[gdal-dev] Question about command line options -append

Victor Chernetsky victor at amigocloud.com
Wed Nov 29 13:33:17 PST 2017


Thanks, this worked!

I have a followup question: how does gdal/ogr2ogr knows that my destination
dataset/layer exists?
For instance, -append option suppose to do different things if layer
exists, or not. I don't see any isExists() APIs that would check it.

Thanks,
*Victor Chernetsky*


+1 (408) 368-4607
victor at amigocloud.com

On Wed, Nov 29, 2017 at 12:02 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> On mercredi 29 novembre 2017 12:00:17 CET Victor Chernetsky wrote:
>
> > Hey Even,
>
> >
>
> > How do I set OVERWRITE option?
>
>
>
> With -lco OVERWRITE=YES since this is a layer creation option
>
>
>
> > I tried all these:
>
> > ogr2ogr -overwrite -f AmigoCloud "AmigoCloud:15276 datasets=100322"
>
>
>
> This will trigger the logic at
>
> https://github.com/OSGeo/gdal/blob/trunk/gdal/apps/ogr2ogr_lib.cpp#L3180
>
> that first try to see if a layer has the same name as the input layer
> name, and if so call DeleteLayer() on it
>
>
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171129/29f23fd6/attachment.html>


More information about the gdal-dev mailing list