ST_Entity

NotaNota:

ST_Geometry in Oracle only

Definition

ST_Entity returns the spatial entity type of an ST_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
 

3/6/2012