Le samedi 03 mars 2012 22:32:53, Martin Landa a écrit : > Hi, > > is there any way how to deal with metadata related to OGRDatasource? I > just found OGRLayer::GetInfo() which could be used for layer-related > key:values metadata. But it is deprecated and no OGR drivers are using > this method. So I am not really sure how to deal with > (datasource/layer-related) metadata when developing OGR driver.
Martin, There's no standardized way to do this unfortunately and GetInfo() is actually advertized as deprecated. Currently, when I need exposing metadata in a OGR driver, I create a dedicated layer that is returned by an overloaded GetLayerByName() method on the datasource object. For example, in the WFS driver, you can request the WFSLayerMetadata and WFSGetCapabilities layers. Perhaps if the GDAL / OGR "grand unification" takes place one day and OGR layers inherit from GDALMajorObject for example, this will be possible in a more convenient way. Best regards, Even _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev