[Qgis-developer] New API for access to vector features

Martin Dobias wonder.sk at gmail.com
Mon Jul 5 15:39:35 EDT 2010


On Mon, Jul 5, 2010 at 3:58 PM, Frank Warmerdam <warmerdam at pobox.com> wrote:
> Martin Dobias wrote:
>>
>> Hi Frank,
>>
>> from our recent discussion on gdal-dev [1] I've got the impression
>> that for allowing second or any further iterator (all active at the
>> same time), the OGR provider could create a clone of its OGRLayer and
>> thus do each iteration in a separate instance of OGRLayer. By making a
>> clone of OGRLayer I mean to open a new one with the same input
>> parameters.
>>
>> [1] http://lists.osgeo.org/pipermail/gdal-dev/2010-June/025012.html
>
> Martin,
>
> I'm sorry for not addressing the clone point in that thread.  Unfortunately
> the cloning ability described in RFC 16 was not approved and implemented so
> there is no way to do such an operation.

Frank,

sure, I know the RFC has not been implemented. Now the provider has
one OGRDataSource and one OGRLayer created from it. What keeps me from
opening a second OGRDataSource and second OGRLayer with the same file
name and layer index? This is what I referred to as a 'clone' of the
first layer. This 'cloned' layer would have the reading state
independent from the original layer, wouldn't it?

When RFC 16 was going to be adopted, what was the expected semantics
of the clone layer functionality? Is there anything more to be done in
order to get a completely separate clone of a OGRLayer than just
instantiating its data source and the layer again?

Regards
Martin


More information about the Qgis-developer mailing list