全部產品
Search
文件中心

PolarDB:ST_SharedPaths

更新時間:Jul 06, 2024

返回一個包含兩個輸入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)