[gdal-dev] adding features to a layer/dataset...

TUELLER, SHAYNE R CIV USAF AFMC 519 SMXS/MXDEC shayne.tueller at us.af.mil
Tue Jun 25 18:17:10 PDT 2019


Hello,

I have a vector GDALDataset that is shared between two applications running on different machines. Both applications call GDALOpenEx(...) to open the shapefile.shp with flags GDAL_OF_VECTOR and GDAL_OF_SHARED flags set to open the dataset. The dataset only has one layer associated with it and the shapefile format is the ESRI shapefile.

After opening the dataset in both applications, the first application creates a new feature and adds it to the layer. The resulting shapefile on disk shows that this is working when I inspect the contents of the shapefile with ogrinfo -al shapefile.shp. The new feature has been added as expected with a feature count = 1.

Is there a way to update the second application to get the changes to the layer made by the first application? I've tried doing layer->SyncToDisk() in the second application but this has no affect. Do I have to close the layer/dataset and reopen it in the second application to get the changes made by the first application?

I'm new to OGR/GDAL so I hope my explanation and question makes sense...

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


More information about the gdal-dev mailing list