ST_IsMeasured

定义

ST_IsMeasured 以 ST_Geometry 对象为输入参数,如果给定几何具有测量值,则返回 1 (Oracle) 或 t (PostgreSQL);否则返回 0 (Oracle) 或 f (PostgreSQL)。

语法

sde.st_ismeasured (g1 sde.st_geometry)

返回类型

布尔型

示例

创建表 ism_test 并向其中插入值。

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)
);

确定 ism_test 表中的哪几行包含测量值。

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

9/15/2013