ST_Point function
The ST_Point function constructs a point from coordinate information or a resulting point of a representation.
- X and Y coordinates only
- X, Y, and Z coordinates
- X, Y, Z, and M coordinates
- A well-known text representation
- A well-known binary representation
- A shape representation
- A representation in the geography markup language (GML)
If the point is constructed from coordinates, and if the X or Y coordinate is null, then an exception condition is raised (SQLSTATE 38SUP). If the Z or M coordinate is null, then the resulting point will not have a Z or M coordinate, respectively. If the point is constructed from its well-known text representation, its well-known binary representation, its shape representation, or its GML representation, and if the representation is null, then null is returned.
Syntax
Parameters
- wkt
- A value of type CLOB(2G) that contains the well-known text representation of the resulting point.
- wkb
- A value of type BLOB(2G) that contains the well-known binary representation of the resulting point.
- gml
- A value of type CLOB(2G) that represents the resulting point using the geography markup language.
- shape
- A value of type BLOB(2G) that represents the shape representation of the resulting point.
- srs_id
- A value of type INTEGER that identifies the spatial reference
system for the resulting point.
If the srs_id parameter is omitted, the spatial reference system with the numeric identifier 0 (zero) is used.
If srs_id does not identify a spatial reference system listed in the catalog view DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS, then an exception condition is raised (SQLSTATE 38SU1).
- x_coordinate
- A value of type DOUBLE that specifies the X coordinate for the resulting point.
- y_coordinate
- A value of type DOUBLE that specifies the Y coordinate for the resulting point.
- z_coordinate
- A value of type DOUBLE that specifies the Z coordinate for the
resulting point.
If the z_coordinate parameter is omitted, the resulting point will not have a Z coordinate. The result of ST_Is3D is 0 (zero) for such a point.
- m_coordinate
- A value of type DOUBLE that specifies the M coordinate for the
resulting point.
If the m_coordinate parameter is omitted, the resulting point will not have a measure. The result of ST_IsMeasured is 0 (zero) for such a point.
Return type
db2gse.ST_Point
Example
In the following examples, the lines of results have been reformatted for readability. The spacing in your results will vary according to your online display.