[gdal-dev] Possible to test for a layer capability before creating a layer?

Nyall Dawson nyall.dawson at gmail.com
Thu Feb 18 16:34:27 PST 2016


On 19 February 2016 at 11:23, Even Rouault <even.rouault at spatialys.com> wrote:
> Le vendredi 19 février 2016 00:55:21, Nyall Dawson a écrit :
>> Hi all,
>>
>> I'm aware that for drivers I can use OGR_Dr_TestCapability to
>> determine whether a particular driver as a specific capability. But is
>> there anyway to test whether a specific driver also has support for a
>> layer capability?
>>
>> The situation is that I'd like to populate a list with all available
>> OGR drivers for which a created layer would then be able to support
>> SequentialWrite, DeleteFeature, RandomWrite and CreateField.
>>
>> What would be the best way to go about this?
>
> There seems to be growing interests for such topic (see yesterday similar
> thread : https://lists.osgeo.org/pipermail/gdal-dev/2016-February/043782.html
> )

Yes, this would be very handy!

>
> The way to go is to add such capability flags at the driver metadata level.
> This is now possible since GDAL 2.0 since OGR drivers can expose arbitrary
> metadata items.
> What has to be done :
> - define which capabilities must be exposed
> - enhance drivers to advertize them

Ok. Does this mean there's no approach which would work for past GDAL
releases? (inc GDAL < 2.0)

Nyall




>
>>
>> Nyall
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com


More information about the gdal-dev mailing list