Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
将几何转换为复合曲线。
geometry-expression.ST_ToCompound()
ST_CompoundCurve 如果 geometry-expression 的类型为 ST_CompoundCurve,则返回 geometry-expression。如果 geometry-expression 的类型为 ST_LineString 或 ST_CircularString,则返回包含一个元素(即 geometry-expression)的复合曲线。如果 geometry-expression 为几何集合,且其中单个元素的类型为 ST_Curve,则返回转换为 ST_CompoundCurve 类型的该元素。如果 geometry-expression 为空集,则返回类型为 ST_CompoundCurve 的空集。否则,将抛出一个异常条件。
结果的空间参照系标识符与 geometry-expression 的空间参照系标识符相同。
将该几何转换为圆弧线串。逻辑等效于 CAST( geometry-expression AS ST_CompoundCurve ) 所使用的逻辑。
如果已知 geometry-expression 为一个 ST_CompoundCurve 值,则使用 TREAT( geometry-expression AS ST_CompoundCurve ) 方法要比使用 ST_ToCompound 方法更为有效。
缺省情况下,如果几何的原始格式可用,ST_ToCompound 将使用该格式。否则使用内部格式。有关内部和原始格式的详细信息,请参见STORAGE FORMAT 子句,CREATE SPATIAL REFERENCE SYSTEM 语句。
SQL/MM (ISO/IEC 13249-3: 2006) 5.1.33
以下示例返回结果 [CompoundCurve ((0 0, 2 1))]。
CompoundCurve ((0 0, 2 1))
SELECT NEW ST_LineString( 'LineString( 0 0, 2 1 )' ).ST_ToCompound()