OSGeo/gdal — pull request #23 by jef-n (2013-10-02 12:11:51+00:00)
Title: introduce OGRLayer::FindFieldIndex() / OGR_L_FindFieldIndex() to lookup ...

In the normal usecase the NAS driver is supposed to always update an preexisting schema. For OCI there is a separate schema in the PostNAS project, that has it's identifiers truncated to a length that Oracle can cope with. Unfortunately ogr2ogr currently doesn't seem to have a way to match and NAS attribute to its LAUNDERed counterpart in Oracle.

This PR introduces a new method OGRLayer::FindFieldIndex() that can be overloaded by the drivers to provide this kind of matching. It also includes an update to ogr2ogr to make use of it and a implementation for the OCI driver, that tries to find the laundered version, if the full version doesn't exist.