1、ST_Geometry的超类和子类


2、常用函数

2.1 sde.st_geometry

语法:

sde.st_geometry (wkt clob, srid integer)

示例:

INSERT INTO GEOMS (id, geometry) VALUES ( 1901, sde.st_geometry (‘point (1 2)’, 4326));

INSERT INTO GEOMS (id, geometry) VALUES ( 1902, sde.st_geometry (‘linestring (33 2, 34 3, 35 6)’, 4326));

INSERT INTO GEOMS (id, geometry) VALUES ( 1903, sde.st_geometry (‘polygon ((3 3, 4 6, 5 3, 3 3))’, 4326));

2.2 sde.st_geomfromtext

语法:

sde.st_geomfromtext (wkt clob, srid integer)

示例:

INSERT INTO GEOMETRY_TEST VALUES ( 1, sde.st_geomfromtext (‘point (10.02 20.01)’, 4326));

INSERT INTO GEOMETRY_TEST VALUES ( 2, sde.st_geomfromtext(‘linestring (10.01 20.01, 10.01 30.01, 10.01 40.01)’, 4326));

INSERT INTO GEOMETRY_TEST VALUES ( 3, sde.st_geomfromtext(‘polygon ((10.02 20.01, 11.92 35.64, 25.02 34.15,19.15 33.94, 10.02 20.01))’, 4326));

2.3 sde.st_point

语法:

sde.st_point (wkt clob, srid integer)

sde.st_point (x number, y number, srid integer)

sde.st_point (x number, y number, m number, srid integer)

sde.st_point (x number, y number, z number, srid integer)

sde.st_point (x number, y number, z number, m number, srid integer)

示例:

INSERT INTO point_test VALUES ( sde.st_point (10.01, 20.03, 4326));

2.4 sde.st_linestring

语法:

sde.st_linestring (wkt clob, srid integer)

示例:

INSERT INTO LINES_TEST (id, geometry) VALUES ( 1901, sde.st_linestring (‘linestring (750 150, 750 750)’, 4326));

2.5 sde.st_linefromtext

语法:

sde.st_linefromtext (wkt clob, srid integer)

示例:

INSERT
INTO
LINESTRING_TEST
VALUES
(
sde.st_linefromtext
(‘linestring (10.01 20.03, 35.93 19.04)’,
4326));

2.6 sde.st_polygon

语法:

sde.st_polygon (wkt clob, srid integer)

示例:

INSERT
INTO
polygon_test
VALUES
(
sde.st_polygon
(‘polygon ((10.01 20.03, 20.94 21.34, 35.93 10.04, 10.01 20.03))’,
4326));

2.7 sde.st_polyfromtext

语法:

sde.st_polyfromtext (wkt clob, srid integer)

示例:

INSERT INTO polygon_test VALUES ( sde.st_polyfromtext (‘polygon ((10.01 20.03, 10.52 40.11, 30.29 41.56, 31.78 10.74, 10.01 20.03))’, 4326));

2.8 sde.st_multipoint

语法:

sde.st_multipoint (wkt clob, srid integer)

示例:

INSERT INTO MPOINT_TEST VALUES (

1110,

sde.st_multipoint (‘multipoint (1 2, 3 4, 5 6)’, 4326)

);

2.9 sde.st_mpointfromtext

语法:

sde.st_mpointfromtext (wkt clob, srid integer)

示例:

INSERT INTO MULTIPOINT_TEST VALUES ( sde.st_mpointfromtext (‘multipoint (10.01 20.03, 10.52 40.11, 30.29 41.56, 31.78 10.74)’, 4326));

2.10 sde.st_multilinestring

语法:

sde.st_multilinestring (wkt clob, srid integer)

示例:

INSERT INTO MLINES_TEST VALUES ( 1910, sde.st_multilinestring (‘multilinestring ((33 2, 34 3, 35 6), (28 4, 29 5, 31 8, 43 12), (39 3, 37 4, 36 7))’, 4326));

2.11 sde.st_mlinefromtext
			

语法:

sde.st_mlinefromtext (wkt clob, srid integer)

示例:

INSERT INTO MLINESTRING_TEST VALUES ( 1, sde.st_mlinefromtext (‘multilinestring ((10.01 20.03, 10.52 40.11, 30.29 41.56,31.78 10.74), (20.93 20.81, 21.52 40.10))’, 4326));

2.12 sde.st_multipolygon

语法:

sde.st_multipolygon (wkt clob, srid integer)

示例:

INSERT INTO MPOLY_TEST VALUES ( 1110, sde.st_multipolygon (‘multipolygon (((3 3, 4 6, 5 3, 3 3),(8 24, 9 25, 1 28, 8 24), (13 33, 7 36, 1 40, 10 43, 13 33)))’, 4326));

2.13 sde.st_mpolyfromtext

语法:

sde.st_mpolyfromtext (wkt clob, srid integer)

示例:

INSERT INTO MPOLYGON_TEST VALUES (

sde.st_mpolyfromtext (‘multipolygon (((10.01 20.03, 10.52 40.11, 30.29 41.56,

31.78 10.74, 10.01 20.03), (21.23 15.74, 21.34 35.21, 28.94 35.35,

29.02 16.83, 21.23 15.74)), ((40.91 10.92, 40.56 20.19, 50.01 21.12,

51.34 9.81, 40.91 10.92)))’, 4326)

);

3、API文档


文档地址:Services/ArcGIS for Server(Windows)/Geodatabases/Administering geodatabases/Using SQL/SQL spatial and raster types/Using St_Geometry with SQL/ST_Geometry function reference

1 对 “ArcSDE Oracle中常见函数”的想法;

  1. st_geometry函数列表https://desktop.arcgis.com/zh-cn/arcmap/10.3/manage-data/using-sql-with-gdbs/a-quick-tour-of-sql-functions-used-with-st-geometry.htm

发表评论

邮箱地址不会被公开。 必填项已用*标注