Opened 14 years ago

Closed 5 years ago

#953 closed defect (fixed)

Support to specify geom column and select list with OGR, ODBC

Reported by: szekerest@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by Jukka Rahkonen)

It would be greatly usable to support for specifying the geometry column
when using OGR ODBC driver.
The current implementation retrieves the geometry_columns table from the
database in order to determine the geometry column of the table which
causes an extra round trip to the server. For a suitable solution the
geometry column name could be specified in the connection string as the
table name.

It would be also helpful to establish the ability to specify the list of
the columns to select, what could restrict the amount of the data as the
user's will.

Change History (1)

comment:1 Changed 5 years ago by Jukka Rahkonen

Description: modified (diff)
Resolution: fixed
Status: newclosed

From the documentation for GDAL 1.11.1 http://www.gdal.org/drv_odbc.html

By default the ODBC searches for GEOMETRY_COLUMNS table. If found it is used to identify the set of spatial tables that should be treated as layers by OGR. If not found, then all tables in the datasource are returned as non-spatial layers. However, if a table list (a list of comma seperated table names) is provided, then only those tables will be represented as layers (non-spatial). Fetching the full definition of all tables in a complicated database can be quite timeconsuming, so the ability to restrict the set of tables accessed is primarily a performance issue.

Issue seems to be fixed.

Note: See TracTickets for help on using tickets.