On vendredi 15 novembre 2019 08:52:48 CET Rahkonen Jukka (MML) wrote: > Hi, > > Shapefile can be edited with ogrinfo > ogrinfo -dialect SQLite -sql "update foo set bar='14'" foo.shp > > GML opens always as read-only with -sql option > ogrinfo -sql "select * from foo" foo.gml > Had to open data source read-only. > INFO: Open of `foo.gml' > using driver `GML' successful. > > How can I know which formats support editing with -sql and which not? I > could not find any obvious metadata by checking the capabilities of a few > different drivers.
There's indeed no driver-level metadata indicating support for updates (update through SQL is just a particular case). With a dataset opened, on a layer, with the API you can query for fine grain capabilities with TestCapability(OLCRandomWrite/OLCDeleteFeature/etc...) Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
