[Qgis-developer] Corrections of QgsOgrProvider implementaion of GDAL 2.0
Mark Johnson
mj10777 at googlemail.com
Mon Mar 20 17:04:44 PDT 2017
>
> So if we want to address both we need the layer_id and layer_name. I'd say
> when you build a OGR URI (mostly in QgisApp::askUserForOGRSublayers()),
> then look at the uniqueness of the layer names. If there's layer name
> unicity, then use only the layer name. Otherwise fallback to uniquely the
> layer_id (and well in that case if the datasource changes at some point, we
> might have an issue indeed)
This is already being done in my version.
Setting the id to -1 could tell the QgsOgrProvider that the layername is
unique
- and remove the need of the extra parameter
id >= 0 would tell QgsOgrProvider that the id MUST be used, because there
are duplicate layernames.
The id and layername will be stored (as it was before) in the URI/Project.
Since at this point it is known that the values are valid
- no further checks are needed and can be opened directly
Can we agree on this?
Anything else still open?
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170321/e0816d2f/attachment.html>
More information about the Qgis-developer
mailing list