Definition
ST_IsMeasured takes a geometry object as an input parameter and returns 1 (Oracle and SQLite) or t (PostgreSQL) if the given geometry has measures; otherwise, a 0 (Oracle and SQLite) or f (PostgreSQL) is returned.
Syntax
Oracle and PostgreSQL
sde.st_ismeasured (geometry1 sde.st_geometry)
SQLite
st_ismeasured (geometry1 geometryblob)
Return type
Boolean
Example
Create a table, ism_test, insert values to it, then determine which rows in the ism_test table contain measures.
Oracle
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))', 4326)
);
INSERT INTO ISM_TEST VALUES (
20,
sde.st_geometry ('multipoint m(10 10 5, 50 10 6, 10 30 8)' , 4326)
);
INSERT INTO ISM_TEST VALUES (
21,
sde.st_geometry ('linestring z(10 10 166, 20 10 168)', 4326)
);
INSERT INTO ISM_TEST VALUES (
22,
sde.st_geometry ('point zm(10 10 16 30)', 4326)
);
SELECT id, sde.st_ismeasured (geom) M_values
FROM ISM_TEST;
ID M_values
19 0
20 1
21 0
22 1
PostgreSQL
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))', 4326)
);
INSERT INTO ISM_TEST VALUES (
20,
sde.st_geometry ('multipoint m(10 10 5, 50 10 6, 10 30 8)' , 4326)
);
INSERT INTO ISM_TEST VALUES (
21,
sde.st_geometry ('linestring z(10 10 166, 20 10 168)', 4326)
);
INSERT INTO ISM_TEST VALUES (
22,
sde.st_geometry ('point zm(10 10 16 30)', 4326)
);
SELECT id, sde.st_ismeasured (geom)
AS has_measures
FROM ism_test;
id has_measures
19 f
20 t
21 f
22 t
SQLite
CREATE TABLE ism_test (
id integer
);
SELECT AddGeometryColumn (
NULL,
'ism_test',
'geom',
4326,
'geometryzm',
'xyzm',
'null'
);
INSERT INTO ISM_TEST VALUES (
19,
st_geometry ('polygon ((40 120, 90 120, 90 150, 40 150, 40 120))', 4326)
);
INSERT INTO ISM_TEST VALUES (
20,
st_geometry ('multipoint m(10 10 5, 50 10 6, 10 30 8)' , 4326)
);
INSERT INTO ISM_TEST VALUES (
21,
st_geometry ('linestring z(10 10 166, 20 10 168)', 4326)
);
INSERT INTO ISM_TEST VALUES (
22,
st_geometry ('point zm(10 10 16 30)', 4326)
);
SELECT id, st_ismeasured (geom)
AS "M_values"
FROM ism_test;
ID M_values
19 0
20 1
21 0
22 1