[Qgis-developer] Corrections of QgsOgrProvider implementaion of GDAL 2.0

Even Rouault even.rouault at spatialys.com
Mon Mar 20 13:01:53 PDT 2017


On lundi 20 mars 2017 20:39:22 CET Mark Johnson wrote:
> >> I see no use of OGR_F_GetGeomFieldRef() so it seems
> 
> that you select among the various different geometry fields by relying on
> the
> "layer_name(geometry_field_name)" syntax
> 
> That is caused by the fact that the initial list
> (QgsOgrProvider::subLayers()) returns only the
> "layer_name(geometry_field_name)" and id
> - whereby, since 30.06.2016, "layer_name(geometry_field_name)" is no longer
> sent to QgsOgrProvider
> 

In the provider we could decide to allocate layer ids diffently than OGR .

Example if you have a dataset with
- layer1 (geom1, geom2)
- layer2 (geom)

Then you would map that to :
- qgis_ogr_provider_layer_id = 1: layer1, geom1
- qgis_ogr_provider_layer_id = 2: layer1, geom2
- qgis_ogr_provider_layer_id = 3: layer2, geom


> >> we only support GDAL >= 2.0 in master
> 
> and it is clear that if QGIS is called with a gdal 1.* version the
> Application will crash with a Lookup error?

Yes. And that's perfectly fine. That's only an issue that can happen for us developers playing 
with different versions, and we know how to solve those issues. Real world users that receive 
software through binary distributions will never have to deal with such version mismatch, so 
no need to clutter the code for those situations.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170320/90f729a0/attachment.html>


More information about the Qgis-developer mailing list