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

Even Rouault even.rouault at spatialys.com
Tue Nov 28 15:30:11 PST 2017


On mardi 28 novembre 2017 15:20:20 CET Victor Chernetsky wrote:
> Hi Even,
> 
> Then in my driver, how do I know if I have to append data to existing
> dataset, 
> or overwrite existing data, or create a new dataset all together?

That should work automagically if you correctly implement the semantics of the 
relevant dataset and layer virtual methods

If the user doesn't specify -append or -overwrite, but just -update, and the layer doesn't exist, 
then ogr2ogr will call GDALDataset::ICreateLayer()

> 
> What about -overwrite option?

If the user specify -overwrite, then ogr2ogr will call GDALDataset::DeleteLayer(), and then 
ICreateLayer()

Looking quickly at the amigocloud driver, everything looks in place already.

Even

-- 
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/db424625/attachment.html>


More information about the gdal-dev mailing list