[Qgis-developer] ogrLayerName in processing/tools/vector.py
Even Rouault
even.rouault at spatialys.com
Tue Oct 18 03:00:45 PDT 2016
Le mardi 18 octobre 2016 11:59:04, Sandro Santilli a écrit :
> On Tue, Oct 18, 2016 at 11:55:21AM +0200, Mark Johnson wrote:
> > > The problem, as Germán found out, is that the URI passed as parameter
> > > is not necessarely an OGR provider URI, but a generic QGIS uri, from
> > > any provider, so it cannot always be opened via ogr.Open.
> >
> > Yes, ogr-sysntax must be used.
> >
> > # -- Spatialite provider
> >
> > # dbname='/tmp/x.sqlite' table="t" (geometry) sql='
> >
> > would need to call 'GetLayerByName'
>
> But the above is NOT an ogrDataSource
> Please see with current master_2 branch if the test work for you
> with both GDAL 1 and GDAL 2:
>
> Running the automated test is done via:
>
> ctest -V -R ProcessingToolsTest
>
> Manual tests imply importing layers to postgis (via processing).
>
> They pass here with GDAL 2
Sandro,
Mark's point is for the particular case of layers with multiple geometry fields
(as may be found in some spatialite DB for example). That's a different issue
than the one you tackle.
Even
>
>
> --strk;
> _______________________________________________
> 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
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the Qgis-developer
mailing list