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

Germán Carrillo carrillo.german at gmail.com
Mon Oct 17 07:37:36 PDT 2016

Hi All,

I've been studying ogrLayerName and GDAL/OGR algorithms in recent days. I
understand ogrLayerName expects a URI from QGIS layers.

One valid QGIS layer URI might be (talking about Spatialite layers):

'dbname=\'/tmp/test.sqlite\' table="test" (geometry) sql='

The PR you merged [1] made it impossible to run an OGR algorithm with a
Spatialite layer with such URI. Hence my comment to the corresponding

I'm working on another PR [2] at the moment that also deals with
ogrLayerName, so I've tested your version of ogrLayerName and adjusted it.
Now it can handle the aforementioned Spatialite layer. This is how
ogrLayerName looks right now in my local repo (that I'll be pushing into my





[1] https://github.com/qgis/QGIS/pull/3605

[2] https://github.com/qgis/QGIS/pull/3591

2016-10-17 9:31 GMT-05:00 Mark Johnson <mj10777 at googlemail.com>:

> Sorry, I misread the request.
> In this case, if I have now understood correctly, you are opening the
> source before retrieving the layer.
> That would then be everything up to the first '|'.
> For a file-base source the full-filename with path.
> For a Database-System such as PostGis the Connection-String to connect to
> the Database (with user/password-information).
> ---
> After the connection has been made use GetName or GetLayer as needed from
> the information supplied after the first '|' to retrieve the layer.
> When the Layer-Name is unique, GetName should be used
> - for drivers such as GML and KML, where the Layer-Name may not be unique,
> Getlayer should be used
> Mark
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Soluciones Geoinformáticas Libres

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161017/33e58980/attachment.html>

More information about the Qgis-developer mailing list