[gdal-dev] Call for discussion on RFC 66: OGR random layer read/write capabilities
Even Rouault
even.rouault at spatialys.com
Mon Oct 3 09:06:12 PDT 2016
Le lundi 03 octobre 2016 17:49:34, Howard Butler a écrit :
> Even,
>
> I briefly looked at it the other day. My only nit was it seems a little
> confusing to have a GetNextFeature on both the Dataset and the Layer. Is
> one always better than the other? Which one should I use when? Should I
> always use Dataset::GetNextFeature() and let it forward down to
> OGRLayer::GetNextFeature()? The RFC is clear about those questions, but
> people don't read the docs :)
Yes I know. We just write them so to have an excuse when they start asking
questions ;-)
To limit the risk of confusion, I'd suggest not to edit the tutorial and other
doc that currently only mention OGRLayer::GetNextFeature(). And perhaps add in
the doc of Dataset::ResetReading() and GetNextFeature() that people in general
should rather use the corresponding OGRLayer methods for simplicity.
> Is it possible and more clear to rename it?
Do you have any suggestion ? But really Dataset::GetNextFeature() and
OGRLayer::GetNextFeature() essentially do the same, just the set that is
iterated over is different.
>
> Its need also suggest this is adding some messiness in the relationship of
> Dataset <-> Layer. I suppose there's not much we can do about that.
Clearly Dataset::GetNextFeature() addresses a particular need, and I'm not
sure that there will be many other user of it than ogr2ogr.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list