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

Even Rouault even.rouault at spatialys.com
Fri Oct 28 04:37:28 PDT 2016


Mark,

I unfortunately don't have time right now to review in detail your message & 
proposed changes, but a few suggestions though.

> https://github.com/mj10777/QGIS/tree/master_2_ogrprovider
> 
> (unfortunately I created this about 2 hours before 'master_2' died, so this
> should be considered as a 'release-2_18' branch)

I think you should target master only for your changes (and consider only GDAL 
>= 2 case). It is unlikely they are appropriate for backporting, or that 
should be considered in a later stage depending on the impact they have.

You should try to create PR for each individual issue, otherwise it is super 
hard to deal with.

> 
> ---
> Main problems:
> 
> Problem 01:
> 
> The retrieval logic for Ogr-Layers changed between gdal 1.* and gdal 2.*.
> This was reported on the 31.03.2015:
> https://hub.qgis.org/issues/12479
> 

I didn't dig up into that but the issue here is with tables with multiple 
geometry columns, right ? In that case, the OGR uri should likely have a 
geometry= parameter so that the right column is selected. Similarly to what 
the spatialite or postgresql providers do.

> 
> --
> Problem 02:
> 
> Since 2015, new code has been added implementing gdal 2.* specific
> functions, which will only be included when compiled/built against gdal
> 2.*.
> 
> Thus, when QGIS is complied against gdal 2.*, symbols/functions are added
> - that doe not exist in gdal 1.*.

To me, this is a non issue, or rather an issue we shouldn't try solving. In 
normal user environements this will not happen. This is just an issue for us 
developers that might play with multiple versions.
What we might perhaps eventually want to ensure is that if QGIS is compiled 
with GDAL 2.X, it works reasonably well when running against GDAL 2.Y where Y 
>= X. And even that can be painful, because 2.Y can introduce for example new 
geometry types not handled in 2.X, so that would oblige to have runtime checks 
in addition to compile time checks. Binary distributions of QGIS are normally 
recompiled against a new major GDAL version if they will run against it.

> 
> For QGIS 3.0: gdal 1.* support should be removed.

This is probably reasonable. I guess that all target environments that will be 
able to run QGIS 3.0 will have at least GDAL 2.0.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the Qgis-developer mailing list