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

Victor Chernetsky victor at amigocloud.com
Tue Nov 28 15:40:46 PST 2017


Here is my example:
ogr2ogr -overwrite -f AmigoCloud "AmigoCloud:15276 datasets=100056"
~/Downloads/Visits.geojson

I am trying to append, or overwrite data into existing dataset id:100056.
But it still created a new dataset, and it did not delete/clean old
dataset. I am thinking I need to do something in
my OGRAmigoCloudDataSource::ICreateLayer(). I am not checking if dataset
exist. I always create a new one.

How should I handle this case?


*Victor Chernetsky*


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

On Tue, Nov 28, 2017 at 3:30 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> 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/20171128/91842b98/attachment-0001.html>


More information about the gdal-dev mailing list