Home | Concepts | API | Samples |
Concepts > Geometry > Geometry Storage | ||||||||||||||||||||||||||||||||||
SQL spatial types, geometry subtypes, and functions | ||||||||||||||||||||||||||||||||||
The OpenGIS
Specification for Simple Features in SQL defines a SQL Spatial type with
associated SQL functions as one of three schemas for managing spatial data. In
the SQL Spatial Type implementation, the coordinate values for the shape are
managed as an SQL object, accessible only through SQL function invocations.
The SQL Spatial Type is just another column in the DBMS table, with well defined properties and behavior. The actual representation of the geometry, and storage of the coordinate data is DBMS specific, and never exposed to the application. This hidden implementation allows us to extend the OpenGIS Specification for Simple Features in SQL with Annotation, CAD, elevations, and measures. The following example illustrates how a geometry type looks in the table. The index is not shown, because it is now managed by the DBMS as an index on the column:
The OpenGIS
specification for the SQL Type implementation defines the following subtype
relationships for the geometry type:
Subtype relationships between Types ST_Curve, ST_Surface, ST_MultiCurve and ST_MultiSurface are defined to be noninstantiable types. No constructors are defined for these types.
Functions
may be associated with abstract data types; for example, a geometry type
could have functions to return the area or length. Functions that operate
on the type are also possible; for example, functions that compute intersections
or the union of two geometries, returning a new geometry as the result.
For example, return all parcels that intersect a specified polygon (named
MyPolygon):
SELECT Parcel.Name, Parcel.Id The spatial functions are fully integrated into the SQL language, allowing them to be used in SELECT statements (as above), and any other place a SQL expression would be used, such as the following INSERT statement: INSERT INTO Countries (Name, Geometry) SQL Spatial Types and Functions are available on all database management systems (DBMS) supported by ArcGIS Server. As other extensible DBMS products become available, they will be evaluated to determine if the necessary functionality exists to provide spatial type support. The SQL Spatial Types and Functions are defined in the OpenGIS specification for SQL for spatial types. Functions are identified with an ST_ prefix for conformance with the SQL/MM specification, but the function signatures are the same in both specifications. Functions prefixed with SE_ are not part of the SQL/MM or OpenGIS specifications, but have been added to ArcSDE implementations on IBM DB2 and Informix. |
feedback |
privacy |
legal |