SELECT ST_AsEWKT(ST_ForceRHR('POLYGON((0 0 2, 5 0 2, 0 5 2, 0 0 2),(1 1 2, 1 3 2, 3 1 2, 1 1 2))')); 4、ST_LineMerge 合并为线;这个函数只能用于线或多段线,如果给一个多边形或几何集合,将返回一个空的几何集合。 geometry ST_LineMerge(geometry amultilinestring); 示例SQL...
获取点的Y坐标 ST_Y(geometry) 获取点的Z坐标 ST_Z(geometry) 获取点的M值 ST_M(geometry) 几何对象构造函数 : 参考语义: Text:WKT WKB:WKB Geom:Geometry M:Multi Bd:BuildArea Coll:Collection ST_GeomFromText(text,[]) ST_PointFromText(text,[]) ST_LineFromText(text,[]) ST_LinestringFromText...
ST_Within(geometry A, geometry B) 如果几何空间对象A存在空间对象B中,则返回TRUE,不要使用GeometryCollection作为参数。 不使用索引可以用_ST_Within ST_Overlaps(geometry, geometry) 如果两个几何空间数据存在交迭,则返回 TRUE,不要使用GeometryCollection作为参数。 不使用索引可以用_ST_Overlaps. ST_Contains(geome...
三ST_LineMerge 上图可知,几条单独的线都是首尾相连的,按道理他们一条条连接起来形成完整的线是可能的,所以很多用户希望不仅仅是图形联合了,数据类型最好也是LineString(Multi类型的图形比较复杂在分析时不好处理),那么ST_LineMerge方法就可以起到用武之地了。 #方法简介geometryST_LineMerge(geometry amultil...
ST_LineInterpolatePoint 函数详情 selectST_ASText(ST_LineInterpolatePoint(ST_LineMerge(geom),0.5))fromline 这样就能获取中间点了。 ST_LineMerge是将multLineString 转成 LineString,即多线格式转为单线。 这个函数前提条件:线几何图形要求必须是单线,即存在两段组合的multLineString,那么就会报错 ...
ST_SetSRID(geometry, integer) 给一个几何对象(geometry)设置一个整型的SRID,对于在一个范围内的查询很实用。 2. 几何空间数据关系函数 ST_Distance(geometry, geometry) 返回两个几何对象的距离(笛卡儿距离),不使用索引。 ST_DWithid(geometry, geometry, float) ...
ST_Transform(way,4326) ) ) )ASwhole_roadFROMplanet_osm_roadsWHEREname='CENTRAL EXPRESSWAY'GROUPBYname; Run Code Online (Sandbox Code Playgroud) ST_Collect()会将构成中央高速公路的所有线串分组为一个线串multilinestring,ST_LineMerge()然后以拓扑合理的方式将其转换为一个线串linestring(即从一个端点...
ST_Contains() Polygon contains another geometric entity ST_Crosses() line crosses another line ST_Distance() find the distance between two entities ST_Dwithin() one geometric entity lies within another ... ... Transformations: FunctionDescription ST_AddPoint() Add a point ST_LineMerge() merge ...
合并为线ST_LineMerge(geometry) 线性参考: 根据location(0-1)获得该位置的点ST_line_interpolate_point(linestring, location) 获取一段线ST_line_substring(linestring, start, end) 根据点获取location(0-1)ST_line_locate_point(LineString, Point) 根据量测值获得几何对象ST_locate_along_measure(geometry, ...
ST_LineMerge Return a (set of) LineString(s) formed by sewing together a MULTILINESTRING. //语法 geometry ST_LineMerge(geometry amultilinestring); //示例 SELECT ST_AsText(ST_LineMerge( ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))'...