There are different issues you've raised and that we might want handle or
> not:
>
> 1) make sure that a URI points to the same layer if the datasource evolves
> (new layer)
>
> 2) be able to deal with the corner cases of layers with same name
>
>
>
> 1) involves that we cannot always rely on the index of the layer in the
> layer list returned by OGR
>
> 2) involves that we cannot always rely on the layer name to identify
> uniquely a layer (can happen in some drivers like KML)
>

The proposed solution deals with problem in QgsOgrProvider::subLayers()
- searches for duplicate names
-- an extra parameter tells QgsOgrProvider if the given id or layername
should be used
- default layername, otherwise id

All of this is stored in the URI for the project.

This was tested with the KML where the problem was reported
- it was then that the layername was removed (i.e. is no longer sent to
QgsOgrProvider by subLayers()) last June

On top of that, we need to add an extra argument to store the geometry
> column name in the URI and in the output of subLayers().

The layername is also needed for the display in QGIS

Mark
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to