[gdal-dev] Call for discussion for "RFC 42: OGR Layer laundered field lookup"

Even Rouault even.rouault at mines-paris.org
Sun Oct 6 13:57:56 PDT 2013


Le dimanche 06 octobre 2013 22:21:52, Tamas Szekeres a écrit :
> Hi Jürgen,
> 
> The commit you're referring to, doesn't seem contain the handling of the
> bExactMatch parameter at the driver. At the moment I consider this a bit
> redundant if calling OGRLayer::FindFieldIndex with bExactMatch = TRUE does
> the same as OGRLayer::GetFieldIndex. In this regard I'd be in favour of
> using the same signature for both functions. In ogr2ogr we could then do
> something like:
> 
> int iDstField = bExactFieldNameMatch?
> poDstLayer->GetFieldIndex(poSrcFieldDefn->GetNameRef()) :
> poDstLayer->FindFieldIndex(poSrcFieldDefn->GetNameRef());

Tamas,

Actually, it was committed in https://github.com/jef-
n/gdal/commit/a12311e56cf09d9deb15a18e93704377d1627c12 following a suggestion 
from mine in the discussion of the pull request.

My rationale was that we have already a few methods that take an approx flag 
(e.g. GetFeatureCount(), CreateField() ), but I don't feel very strongly for 
one way or the other one.

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list