Changes between Initial Version and Version 1 of rfc42_find_laundered_fields


Ignore:
Timestamp:
Oct 5, 2013, 7:50:32 PM (11 years ago)
Author:
jef
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rfc42_find_laundered_fields

    v1 v1  
     1= RFC 42: OGR Layer laundered field lookup =
     2
     3Author: Jürgen Fischer[[BR]]
     4Contact: jef at norbit dot de[[BR]]
     5
     6== Summary ==
     7
     8This (mini)RFC proposes a new method in the OGR layer class (and a C API) to lookup the field index of fields, whose names have been altered by drivers (eg. by LAUNDER in OCI or Pg).
     9
     10== Implementation ==
     11
     12There is already a pull request on github (https://github.com/OSGeo/gdal/pull/23) that implements this RFC.   It adds the virtual method OGRLayer::FindFieldIndex(), that implements the usual mapping, which can be overloaded by drivers.   The OCI driver does this to optionally return the index of the LAUNDERed field in case the original field does not exists.  The pull request also modifies ogr2ogr to make use of that method and offers a switch -relaxedFieldNameMatch to enable it.
     13
     14== Background ==
     15This is a particular problem when using NAS as that usually operates on a pre-existing schema.  This schema had to be adapted for Oracle as Oracle has a identifier length restrictions that quite a number of identifiers in NAS exceed.
     16Hence ogr2ogr failed to make the mapping between the short names and their long counter parts and leaves those fields empty.
     17
     18== References ==
     19 * https://github.com/OSGeo/gdal/pull/23
     20 * PostgreSQL NAS schema: http://trac.wheregroup.com/PostNAS/browser/trunk/import/alkis_PostNAS_schema.sql
     21 * Oracle NAS schema: http://trac.wheregroup.com/PostNAS/browser/trunk/import/alkis_PostNAS_ORACLE_schema.sql
     22 * conversion script from Pg to OCI: http://trac.wheregroup.com/PostNAS/browser/trunk/import/pg-to-oci.pl