ST_IsMeasured

Definition

ST_IsMeasured takes an ST_Geometry as an input parameter and returns 1 (Oracle) or t (PostgreSQL) if the given geometry has measures; otherwise, 0 (Oracle) or f (PostgreSQL) is returned.

Syntax

sde.st_ismeasured (g1 sde.st_geometry)

Return type

Boolean

Example

Create a table, ism_test, and insert values to it.

CREATE TABLE ism_test (id integer, geom sde.st_geometry);

INSERT INTO ISM_TEST VALUES (
19,
sde.st_geometry ('polygon ((40 120, 90 120, 90 150, 40 150, 40 120))', 0)
);

INSERT INTO ISM_TEST VALUES (
20,
sde.st_geometry ('multipoint m(10 10 5, 50 10 6, 10 30 8)' , 0)
);

INSERT INTO ISM_TEST VALUES (
21,
sde.st_geometry ('linestring z(10 10 166, 20 10 168)', 0)
);

INSERT INTO ISM_TEST VALUES (
22, 
sde.st_geometry ('point zm(10 10 16 30)', 0)
);

Determine which rows in the ism_test table contain measures.

Oracle

SELECT id, sde.st_ismeasured (geom) Has_Ms
FROM ISM_TEST;

        ID   Has_Ms

      19          0
      20          1
      21          0
      22          1

PostgreSQL

SELECT id, sde.st_ismeasured (geom) 
AS has_measures
FROM ism_test;

        id   has_measures

      19          f
      20          t
      21          f
      22          t

6/19/2015