[Qgis-developer] ogrLayerName in processing/tools/vector.py

Sandro Santilli strk at kbt.io
Mon Oct 17 06:43:56 PDT 2016


Hi Mark,
maybe my question wasn't clear so I'll re-phrase it:

What syntax for the "uri" parameter passed to ogrLayerName
should be supported ? Is it correct to assume "any URI understood
by the OGR provider" ?

--strk;

On Mon, Oct 17, 2016 at 02:27:16PM +0200, Mark Johnson wrote:
> At present, this is not so simple due to recent changes in gdal, but also
> to changes made to support duplicate layer-names only layerid is being used.
> 
> For QGIS compiled against gdal 1.*
> using: |layerid=n|layername=somename
> 
> should be used and in most cases work correctly.
> 
> At the moment an attempt to to open with 'layername' will first be
> attempted (without checks for duplicate names, thus the first will be
> taken) and if that fails, to open with layerid.
> 
> When gdal 2.* is being used, retrieving with layerid will fail after the
> first table that has more than 1 geometry.
> 
> The goal of the Grant Programme '9)​  Correction of QgsOgrProvider
> implementaion of GDAL 2.0' was to resolve this problem.
> 
> Mark Johnson


More information about the Qgis-developer mailing list