ArcGIS Server Banner

ST_Entity

ST_Entity

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

NOTE: Spatial type for Oracle only

Definition

ST_Entity returns the spatial entity type of a geometry. The spatial entity type is the value stored in the entity member field of the ST_Geometry object.

Syntax

sde.st_entity (g1 sde.st_geometry)

Return type

Number

Example

CREATE TABLE sample_geometries (id integer, geometry sde.st_geometry);

INSERT INTO sample_geometries (id, geometry) VALUES (
1901,
sde.st_geometry ('point (1 2)', 0)
);

INSERT INTO sample_geometries (id, geometry VALUES (
1902,
sde.st_geometry ('linestring (33 2, 34 3, 35 6)', 0)
);

INSERT INTO sample_geometries (id, geometry) VALUES (
1903,
sde.st_geometry ('polygon ((3 3, 4 6, 5 3, 3 3))', 0)
);

SELECT sde.st_entity (geometry) entity, UPPER (sde.st_geometrytype (geometry))
TYPE
FROM sample_geometries;

ENTITY  TYPE

    1    ST_POINT
    4    ST_LINESTRING
    8    ST_POLYGON

See Also

  • An overview of SQL functions used with ST_Geometry types