文档

ST_SharedPaths

更新时间:

返回一个包含两个输入Geometry共享的路径的集合。

语法

geometry  ST_SharedPaths(geometry  lineal1 , geometry  lineal2);

参数

参数名称

描述

lineal1

路径1。

lineal2

路径2。

描述

  • 方向相同的对象在返回集合的第一个元素中,方向相反的对象在返回集合的第二个元素中。

  • 路径基于第一个Geometry对象的方向。

示例

默认调用:

select ST_AsText(ST_GeometryN(g,1)),ST_AsText(ST_GeometryN(g,2)) from (select ST_SharedPaths('LINESTRING(-1 0,0 0,0 1)'::geometry,'LINESTRING(0 0,0 1,1 1)'::geometry) as g) as t;
         st_astext          |       st_astext
----------------------------+-----------------------
 MULTILINESTRING((0 0,0 1)) | MULTILINESTRING EMPTY
(1 row)
  • 本页导读 (1)
文档反馈