Un recorrido rápido por el uso de SQL con los tipos ST_Geometry y ST_Raster

You can use the database management system's (DBMS) Structured Query Language (SQL), data types, and table formats to work with the information stored in a geodatabase. SQL is a database language that supports data definition and data manipulation commands.

Accessing the information in a geodatabase via SQL allows external applications to work with the tabular data managed by the geodatabase. These external applications can be nonspatial database applications or custom spatial applications developed in an environment other than ArcObjects.

You can issue SELECT statements against any of the supported DBMS types for geodatabases, as well as against file-based data sources. The topics About building a SQL expression and SQL reference provide you with information about building SELECT statements for different data sources.

PrecauciónPrecaución:

Be aware that using SQL to access the geodatabase bypasses geodatabase functionality, such as versioning, topology, networks, terrains, feature-linked annotation, or other class or workspace extensions. It may be possible to use DBMS features such as triggers and stored procedures to maintain the relationships between tables needed for certain geodatabase functionality. However, executing SQL commands against the database without taking this extra functionality into account—for example, issuing INSERT statements to add records to a business table or adding a column to an existing feature class—will circumvent geodatabase functionality and possibly corrupt the relationships between data in your geodatabase.

In general, the following guidelines apply when using SQL to modify information in the geodatabase:

The preceding guidelines apply to any attribute, spatial or nonspatial. This book of the help focuses on using SQL for spatial selections, altering data, and altering the properties of data stored in the ST_Geometry and ST_Raster data storage types.

El tipo de almacenamiento ST_Geometry

The ST_Geometry SQL data type is used in geodatabases stored in DB2, Informix, Oracle, and PostgreSQL. This data type can be used within the geodatabase plus it provides SQL access to simple feature class geometry for third-party applications.

ST_Geometry implements the OGC and ISO SQL Multimedia Specification for Spatial. The OGC reference is OpenGIS Implementation Specification for Geographic information —Simple feature access—Part 2: SQL option, version 1.1.0. The ISO reference is ISO/IEC 13249-3 SQL multimedia and application packages—Part 3: Spatial.

For information on using SQL with the ST_Geomery type in DB2 or Informix, consult the IBM DB2 and Informix documentation. For information on using SQL with the ST_Geometry type in Oracle and PostgreSQL, see the subsequent section.

SugerenciaSugerencia:

The "Using spatial types with SQL" section of this help does contain some examples for DB2 and Informix; however, for complete information on using ST_Geometry with these databases, read the IBM documentation.

Usar funciones SQL con ST_Geometry en Oracle y PostgreSQL

Para acceder, analizar y manipular datos con SQL, debe utilizar las funciones instaladas con ArcSDE.

Estas funciones pueden agruparse según el uso.

El tipo de almacenamiento ST_Raster

Puede usar el tipo de datos ST_Raster en las geodatabases de ArcSDE. Este tipo de datos puede usarse dentro de la geodatabase y, además, proporciona acceso SQL a datos ráster para aplicaciones de terceros.

El tipo ST_Raster está disponible en las geodatabases de ArcSDE en Oracle, en PostgreSQL y en Microsoft SQL Server.

Se usan dos categorías diferentes de las funciones ST_Raster para acceder al tipo ST_Raster con SQL:

Funciones ST_Raster y ST_PixelData

Estos son métodos que crean instancias y funcionan con el objeto ST_Raster.

Utilidades del procedimiento almacenado ST_RasterUtil

Los procedimientos almacenados ST_RasterUtil admiten la creación y el mantenimiento del tipo ST_Raster. Las funciones disponibles son las siguientes:

ST_RasterUtil_checkLibraryVersion

ST_RasterUtil.describe

ST_RasterUtil.getVersion

ST_RasterUtil_getLibraryVersion

ST_RasterUtil.initialize

Temas relacionados


7/11/2012