Show Navigation | Hide Navigation
You are here:
Geodatabases and ArcSDE > Geodatabase data storage and schema > Feature geometry and raster data storage

The ST_Geometry storage type

Release 9.2
Last modified April 3, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Feature geometry and raster data storage"


Related Topics

ArcSDE geodatabase storage for Oracle, DB2, and Informix uses a SQL data type—ST_Geometry—which provides full geodatabase support and access as well as SQL access to feature class geometry. This enables you to write SQL applications using your DBMS that can access and use feature operations and queries. Each DBMS is supported as follows:

DBMS Description
Oracle The ST_Geometry data type is one of the ArcSDE options for storing feature geometry. It is included with ArcSDE for Oracle and is one of the feature storage options you have for Oracle. It is a high performance storage type provided as part of ArcSDE for Oracle that includes ISO and OGC compliant SQL access to geodatabase features.
IBM DB2 The DB2 Spatial Extender provided by IBM as part of the DB2 product is the only option used to store feature geometry in DB2 geodatabases. It was co-developed by ESRI and IBM, is a high performance storage type that provides ISO and OGC compliant SQL access to geodatabase features, and uses the ST_Geometry data type.
IBM Informix The Informix Spatial DataBlade provided by IBM as part of the Informix product is the only option used to store feature geometry in Informix geodatabases. It was co-developed by ESRI and IBM, is a high performance storage type that provides ISO and OGC compliant SQL access to geodatabase features, and uses the ST_Geometry data type.

This topic describes how geometry has been implemented within ST_Geometry—as a User-defined Data Type (UDT). UDTs are data structures and functions that are defined based on the operations that can be performed on the data, not in terms of how you implement them. The IBM DB2 Spatial Extender and IBM Informix Spatial Datablade use the ST_Geometry data type, and the ST_Geometry data type is supported in ArcSDE for Oracle geodatabases.

As a data type, ST_Geometry allows you to define columns that store spatial data. The ST_Geometry data type itself is an abstract, non-instantiated superclass, the subclasses (or subtypes) of which may be instantiated. An instantiated data type is one that can be defined as a table column and have values of its type inserted into it. A column can be defined as type ST_Geometry, but ST_Geometry values cannot be inserted into it since they cannot be instantiated. Therefore, only the subtype values can be inserted into this column. The ST_Geometry data type can accept and store any of its subtypes, while its subtypes (subclass data types) can only accept their own values.

The following chart demonstrates the hierarchy of the ST_Geometry data type and its subclasses (or subtypes). ST_Curve, ST_Surface, ST_MultiCurve, and ST_MultiSurface are defined to be noninstantiated types. No constructors are defined for these types.

ST_Geometry

Subclasses



The ST_Geometry data type is not instantiable but instead must store its instantiable subclasses. The subclasses are divided into two categories: the base geometry subclasses and the homogeneous collection subclasses. The base geometries include ST_Point, ST_LineString, and ST_Polygon, while the homogeneous collections include ST_MultiPoint, ST_MultiLineString, and ST_MultiPolygon. As the names imply, the homogeneous collections are collections of base geometries. In addition to sharing base geometry properties, homogeneous collections have some of their own properties as well.

To discover the subtype of an ST_Geometry, you would use the ST_GeometryType function. The ST_GeometryType function takes an ST_Geometry and returns the instantiated subtype in the form of a character string. To find out how many base geometry elements are contained in a homogenous collection, you would use the ST_NumGeometries function, which takes a homogeneous collection and returns the number of base geometry elements it contains. The ST_GeometryN function takes a homogeneous collection and an index and returns the nth base geometry.

Each subtype stores the type of geometry implied by its name; for instance, ST_MultiPoint stores multipoints. Each subtype has particular functions that can return information about the subtype. A summary of the subtypes, their descriptions, and example functions that can be used to get information about the subtypes are listed in the table below.

Subtype Description Functions used with the subtype
ST_Point
  • A zero-dimensional geometry that occupies a single location in coordinate space
  • An ST_Point has a single x,y coordinate value, is always simple, and has a NULL boundary. -Used to define features such as oil wells, landmarks, and elevations

  • ST_X—Returns a point's x-coordinate value as a double-precision number -ST_Y—Returns a point's y-coordinate value as a double-precision number -ST_Z—Returns a point's z-coordinate value as a double-precision number -ST_M—Returns a point's m-coordinate value as a double-precision number
ST_LineString
  • A one-dimensional object stored as a sequence of points defining a linear interpolated path
  • ST_LineStrings have length.
  • The ST_LineString is simple if it does not intersect its interior.
  • The endpoints (the boundary) of a closed ST_LineString occupy the same point in space.
  • An ST_LineString is a ring if it is both closed and simple.
  • The endpoints normally form the boundary of an ST_LineString unless the ST_LineString is closed, in which case the boundary is NULL.
  • The interior of an ST_LineString is the connected path that lies between the endpoints, unless it is closed, in which case the interior is continuous.
  • ST_LineStrings are often used to define linear features such as roads, rivers, and power lines.

  • ST_StartPoint—Returns the first point of a linestring
  • ST_EndPoint—Returns the last point of a linestring
  • ST_PointN—Takes a linestring and an index to an nth point and returns that point
  • ST_Length—Returns a linestring's length as a double precision number
  • ST_NumPoints—Returns the number of points in a linestrings sequence as an integer
  • ST_IsRing—Returns 1 (TRUE) if a linestring is a ring or 0 (FALSE) if it is not
  • ST_IsClosed—Returns 1 (TRUE) if a linestring is closed or 0 (FALSE) if it is not
ST_Polygon
  • A two-dimensional surface stored as a sequence of points defining its exterior bounding ring and 0 or more interior rings
  • ST_Polygon has area and is always simple
  • The exterior and any interior rings define the boundary of an ST_Polygon, and the space enclosed between the rings defines the ST_Polygon's interior.
  • The rings of an ST_Polygon can intersect at a tangent point but never cross.
  • Defines parcels of land, water bodies, and other features having spatial extent

  • ST_Area—Returns a polygon's area as a double-precision number
  • ST_ExteriorRing—Returns a polygon's exterior ring as a linestring
  • ST_NumInteriorRing—Returns the number of interior rings a polygon contains
  • ST_InteriorRingN—Takes a polygon and an index and returns the nth interior ring as a linestring
  • ST_Centroid—Returns a point that is the center of the polygon's envelope
  • ST_PointOnSurface—Returns a point that is guaranteed to be on the surface of the polygon
ST_MultiPoint
  • A collection of ST_Points
  • Has a dimension of 0
  • An ST_MultiPoint is simple if none of its elements occupy the same coordinate space.
  • The boundary of an ST_MultiPoint is NULL. -Define such things as aerial broadcast patterns and incidents of a disease outbreak

ST_MultiLineString
  • A collection of ST_LineStrings
  • ST_MultiLineStrings have length.
  • ST_MultiLineStrings are simple if they only intersect at the endpoints of the ST_LineString elements.
  • ST_MultiLineStrings are nonsimple if the interiors of the ST_LineString elements intersect.
  • The boundary of an ST_MultiLineString is the nonintersected endpoints of the ST_LineString elements.
  • The ST_MultiLineString is closed if all its ST_LineString elements are closed.
  • The boundary of an ST_MultiLineString is NULL if all the endpoints of all the elements are intersected.
  • Used to define such entities as streams or road networks

  • ST_Length—Returns the cumulative length of all the ST_LineString elements of a multilinestring as a double-precision number
  • ST_IsClosed—Returns 1 (TRUE) if the multilinestring is closed and 0 (FALSE) if it is not
ST_MultiPolygon
  • A collection of polygons ST_MultiPolygons have area.
  • The boundary of an ST_MultiPolygon is the cumulative length of its elements' exterior and interior rings.
  • The interior of an ST_MultiPolygon is defined as the cumulative interiors of its element ST_Polygons.
  • The boundary of an ST_MultiPolygon's elements can only intersect at a tangent point.
  • Define features such as a forest stratum or a noncontiguous parcel of land such as a Pacific island chain.

  • ST_Area—Returns the cumulative ST_Area of a multipolygon's polygon elements as a double-precision number
  • ST_Centroid—Returns a point that is the center of a multipolygon's envelope
  • ST_PointOnSurface—Returns a point that is guaranteed to be normal to the surface of one of the multipolygon's polygon elements

Throughout the remainder of this topic, the term geometry or geometries collectively refers to the superclass ST_Geometry data type and all of its subclass data types. Whenever it is necessary to specify the geometry superclass directly, it will be referred to as the ST_Geometry superclass or the ST_Geometry data type.

The following sections elaborate on the properties of the geometry, the example functions that can be used to discover these properties, and how to use it with ArcGIS.


Geometry properties


There are many properties that characterize geometry. Some of these properties, along with the functions you can use to determine a geometry's properties, are listed below.

Note that each subtype inherits the properties of the ST_Geometry superclass but also has properties of its own. Functions that operate on the ST_Geometry data type will accept any of the subclass data types (subtypes). However, some functions have been defined at the subtype level and will only accept certain subtypes. For example, the ST_GeometryN function only takes ST_Multi(-linestring,-point,-polygon) subtype values as input.

You can use the following links to navigate to different geometry properties:






Top of section


Using ST_Geometry with ArcGIS

ArcGIS is designed to work with the ST_Geometry spatial type through ArcSDE. ST_Geometry is the spatial storage type when using ArcSDE for DB2 or ArcSDE for Informix. ArcSDE for Oracle supports a number of different geometry storage schemas such as ST_Geometry and SDEBINARY. These different schemas can all be used together in the same database. While there can only be one default geometry schema, individual feature classes can be created using different geometry schemas. To learn about setting your Oracle database to use ST_Geometry storage by default, see the section 'Creating feature classes in Oracle with ST_Geometry storage' in the topic A spatial type for Oracle.

ESRI recommends creating feature classes in spatial type format using ArcGIS versus using SQL. This recommendation is based on the following:



Creating a new feature class with ArcGIS


There are four primary ways to create a new feature class in your geodatabase:



For instructions on how to create a new feature class using ArcGIS, see Creating feature classes.

When you create new feature classes in a geodatabase in DB2 or Informix, it will automatically use ST_Geometry storage. To create a new feature class using ST_Geometry storage in Oracle, you either need to alter your DBTUNE table DEFAULTS GEOMETRY_STORAGE setting, or you need to specify a configuration keyword during feature class creation that instructs ArcGIS to store that particular feature class using ST_Geometry storage. See Geometry storage parameters and keywords for details.

At this stage, you now have a feature class stored in ST_GEOMETRY format. In addition to being ready for use by ArcGIS, the feature class is also available for use via spatial type SQL operators and functions.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.