📄 drv_odbc.html
字号:
<html><head><title>ODBC RDBMS</title></head><body bgcolor="#ffffff"><h1>ODBC RDBMS</h1>OGR optionally supports spatial and non-spatial tables accessed via ODBC. ODBC is a generic access layer for access to many database systems, anddata that can be represented as a database (collection of tables). ODBCsupport is potentially available on Unix and Windows platforms, but isonly included in unix builds by special configuration options.<p>ODBC datasources are accessed using a datasource name of the form<b>ODBC:<i>userid</i>/<i>password</i>@<i>dsn</i>,<i>tablename(geometrycolname),...</i>:<i>srs_tablename(sridcolumn,srtextcolumn)</i></b>.With optional items dropped the following are also acceptable:<ul><li> <b>ODBC:<i>userid</i>/<i>password</i>@<i>dsn</i></b><li> <b>ODBC:<i>userid</i>@<i>dsn</i>,<i>table_list</i></b><li> <b>ODBC:<i>dsn</i>,<i>table_list</i></b><li> <b>ODBC:<i>dsn</i></b><li> <b>ODBC:<i>dsn</i>,<i>table_list</i>:<i>srs_tablename</i></b></ul>The <b><i>dsn</i></b> is the ODBC Data Source Name. Normally ODBC datasourcesare setup using an ODBC Administration tool, and assigned a DSN. That DSNis what is used to access the datasource.<p>By default the ODBC searches for GEOMETRY_COLUMNS table. If found it isused to identify the set of spatial tables that should be treated as layersby OGR. If not found, then all tables in the datasource are returned asnon-spatial layers. However, if a table list (a list of comma seperated tablenames) is provided, then only those tables will be represented as layers(non-spatial). Fetching the full definition of all tables in a complicateddatabase can be quite timeconsuming, so the ability to restrict the set oftables accessed is primarily a performance issue.<p>If the GEOMETRY_COLUMNS table is found, it is used to select a column to be the geometry source. If the tables are passed in the datasource name, then the geometry column associated with a table can be included in round brackets after the tablename. It is currently a hardcoded assumptionthat the geometry is in Well Known Binary (WKB) format if the fieldis binary, or Well Known Text (WKT) otherwise. The GEOMETRY_COLUMNStable should have at least the columns F_TABLE_NAME, F_GEOMETRY_COLUMNand GEOMETRY_TYPE. <p>If the table has a geometry column, and has fields called XMIN, YMIN, XMAXand YMAX then direct table queries with a spatial filter accelerate thespatial query. The XMIN, YMIN, XMAX and YMAX fields should represent theextent of the geometry in the row in the tables coordinate system.<p><h2>Creation Issues</h2>Currently the ODBC OGR driver is read-only, so new features, tables anddatasources cannot normally be created by OGR applications. This limitationmay be removed in the future. <p><h3>See Also</h3><ul><li> <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_api_reference.asp">MSDN ODBC API Reference</a><p></ul></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -