Converts the geometry to a point.
geometry-expression.ST_ToPoint()
ST_Point If the geometry-expression is of type ST_Point, return the geometry-expression. If the geometry-expression is a geometry collection with a single element of type ST_Point, return that element. If the geometry-expression is the empty set, return an empty set of type ST_Point. Otherwise, raise an exception condition.
The spatial reference system identifier of the result is the same as the spatial reference system of the geometry-expression.
Converts the geometry to a point. The logic is equivalent to that used for CAST( geometry-expression AS ST_Point ).
If geometry-expression is already known to be an ST_Point value, it is more efficient to use TREAT( geometry-expression AS ST_Point ) than the ST_ToPoint method.
By default, ST_ToPoint uses the original format for a geometry, if it is available. Otherwise, the internal format is used. For more information about internal and original formats, see STORAGE FORMAT clause, CREATE SPATIAL REFERENCE SYSTEM statement.
SQL/MM (ISO/IEC 13249-3: 2006) 5.1.33
The following example returns the result Point (1 2)
.
SELECT NEW ST_GeomCollection( NEW ST_Point(1,2) ).ST_ToPoint().ST_AsText() |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |