获取Y坐标ST_Y(geometry) 和X坐标ST_X(geometry)
select dmgeo2.ST_X(geom),dmgeo2.ST_Y(geom) ,to_char(dmgeo2.ST_AsText(geom)) from dmpoint;
ST_Equals(geometry)——判断两个几何对象是否相同
SELECT dmgeo2.ST_Equals(dmgeo2.ST_GeomFromText('POINT(1 1)', 4326),dmgeo2.ST_GeomFromText('POINT(2 2)', 4326));
ST_Distance (geometry)——获取几何对象间的最短距离
SELECT dmgeo2.ST_Distance(dmgeo2.ST_GeometryFromText('POINT(1 1)', 4326), dmgeo2.ST_GeometryFromText('POINT(2 2)', 4326) );
ST_Length(geometry) —— 返回线串的长度 ST_StartPoint(geometry) —— 将线串的第一个坐标作为点返回 ST_EndPoint(geometry) —— 将线串的最后一个坐标作为点返回 ST_NumPoints(geometry) —— 返回线串的坐标数量SELECT dmgeo2.ST_Length(geom) 线长度,to_char(dmgeo2.ST_AsText(dmgeo2.ST_StartPoint(geom))) 线串初始坐标,to_char(dmgeo2.ST_AsText(dmgeo2.ST_EndPoint(geom)))线串结束坐标,dmgeo2.ST_NumPoints(geom) 线串坐标数量,to_char(dmgeo2.ST_AsText(geom)) FROM dmLine;
ST_Area(geometry) —— 返回多边形的面积 ST_Perimeter(geometry) —— 返回所有环的长度 SELECT dmgeo2.ST_Area(geom) 面积,dmgeo2.ST_Perimeter(geom) 周长,to_char(dmgeo2.ST_AsText(geom)) FROM dmPOLYGON;标签:学习,char,dmgeo2,ST,空间数据,geometry,geom,坐标,达梦 From: https://www.cnblogs.com/fangzpa/p/17759913.html