Definición
ST_IsMeasured toma un objeto de geometría como parámetro de entrada y devuelve 1 (Oracle y SQLite) o t (PostgreSQL) si la geometría dada tiene medidas; de lo contrario, se devuelve 0 (Oracle y SQLite) o f (PostgreSQL).
Sintaxis
Oracle y PostgreSQL
sde.st_ismeasured (geometry1 sde.st_geometry)
SQLite
st_ismeasured (geometry1 geometryblob)
Tipo de devolución
Booleano
Ejemplo
Cree una tabla, ism_test, inserte valores en ella y determine qué filas de la tabla ism_test contienen medidas.
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