[Qgis-developer] Corrections of QgsOgrProvider implementaion of GDAL 2.0
Even Rouault
even.rouault at spatialys.com
Tue Mar 21 02:54:38 PDT 2017
> To solve the issue of several geometry fields we also need a (optional)
>
> > parameter with the geometry column name.
>
> subLayers() will send the layer name in the 'table_name(field_name)' format
>
> It was only with gdal 1 that GDALDatasetGetLayerByName could not use that
> format.
> That means the 'table_name(field_name)' format can always be used.
table_name(field_name) is only valid as a OGR layer name for the SQLite driver and this is a
legacy behaviour of the GDAL 1 era. That will *not* work for other formats that can have
multiple geometry fields, like GML.
We could potentially use it as a QGIS layername, but it would probably be cleaner to have a
dedicated URI parameter for the geometry column name. Anyway at the OGR API level, I
reiterate that we must have a separate OGR layer name (for GetLayerByname()) and OGR
geometry field name (for GetGeomFieldIndex())
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170321/2bb51b12/attachment.html>
More information about the Qgis-developer
mailing list