Définition
La fonction ST_IsMeasured accepte un objet géométrie comme paramètre en entrée et renvoie la valeur 1 (Oracle et SQLite) ou t (PostgreSQL) si cette géométrie présente des mesures. Sinon, elle renvoie 0 (Oracle et SQLite) ou f (PostgreSQL).
Syntaxe
Oracle et PostgreSQL
sde.st_ismeasured (geometry1 sde.st_geometry)
SQLite
st_ismeasured (geometry1 geometryblob)
Type de retour
Booléen
Exemple
Créez une table, ism_test, insérez des valeurs dans cette table, puis déterminez quelles lignes de la table ism_test contiennent des mesures.
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