Opened 9 years ago

Last modified 9 years ago

#5816 closed defect

Create consistent Layer creation options for geometry column name, spatial index and FID — at Version 2

Reported by: jpalmer Owned by: Even Rouault
Priority: normal Milestone: 2.0.0
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by jpalmer)

Various OGR vector drivers provide the option to define the name of the geometry field/column when creating a layer. When scripting for multiple output formats at runtime this is an annoyance.

GDAL should have one consistent layer creation option for this option across all drivers. It should also be possible to retain the older LCO values for compatibility reasons, but not advertise them in the documentation any more. Could be a good idea to address this before GDAL 2.0 is released :)

Below is a list of the different LCO for each driver:

DriverLayer creation option
MSSQLSpatialGEOM_NAME
PostgreSQLGEOMETRY_NAME
GPKGGEOMETRY_COLUMN
FileGDBGEOMETRY_NAME
MySQLGEOMETRY_NAME
SQLite - none - (GEOMETRY / WKT_GEOMETRY hardcoded)
OCIGEOMETRY_NAME

==> Use GEOMETRY_NAME

Similar situation with FID column name:

DriverLayer creation option
MSSQLSpatial -none - (ogr_fid hardcoded)
PostgreSQLFID
GPKGFID
FileGDBOID_NAME
MySQLMYSQL_FID
SQLite - none - (OGC_FID hardcoded) -->TODO
OCI - none, but use OCI_FID configuration option that default to OGR_FID

==> Use FID

And a few minor issues with spatial index with the OCI driver using INDEX and the documentation being inconsistent across the drivers:

DriverLayer creation optionDocumented
MSSQLSpatialSPATIAL_INDEXNot documented
PostgreSQLSPATIAL_INDEXOFF/ON
GPKGSPATIAL_INDEXYES, NO
MySQLSPATIAL_INDEXYES, NO
SQLiteSPATIAL_INDEXyes/no
OCIINDEXOFF

Change History (2)

comment:1 by Even Rouault, 9 years ago

Description: modified (diff)
Milestone: 2.0
Owner: changed from warmerdam to Even Rouault
Summary: Create consistent Layer creation options for geometry column nameCreate consistent Layer creation options for geometry column name and FID

comment:2 by jpalmer, 9 years ago

Description: modified (diff)
Summary: Create consistent Layer creation options for geometry column name and FIDCreate consistent Layer creation options for geometry column name, spatial index and FID
Note: See TracTickets for help on using tickets.