[Qgis-developer] ogrLayerName in processing/tools/vector.py
carrillo.german at gmail.com
Mon Oct 17 07:37:36 PDT 2016
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  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  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
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
> 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...
More information about the Qgis-developer