Point Constructors
OcientGeo™ POINT constructors use geospatial data to create a POINT object.
ST_CENTROID
Returns a POINT that is the geographic center of mass of a specified geospatial object.
The geographic center of mass is calculated by taking the average of all points on a three-dimensional sphere, projecting the resultant point onto the sphere, and converting it back to latitude and longitude coordinates.
Syntax
Example
Output: POINT(1.66 1.33)
ST_GEOGPOINT
Alias for ST_POLYGON(ST_LINESTRING(ARRAY(ST_POINT(lon, lat)))).
Creates and returns a POLYGON geography with a single point, defined by the longitude and latitude specified for the function.
Syntax
Example
Output: POLYGON((41.882548 -87.63922))
ST_MAKEPOINT
Alias for ST_POINT.
ST_POINT
Creates a POINT from the specified input arguments.
ST_POINT(binary)
Alias for ST_POINTFROMWKB.
Creates a POINT from the specified BINARY value, which must represent a point in WKB format.
Syntax
Example
Output: POINT(1 2)
ST_POINT(char)
Creates a POINT from a CHAR value that represents a point in WKT format.
Syntax
Example
Output: POINT(1 2)
ST_POINT(lon, lat)
Creates a POINT defined with the values provided for the longitude and latitude coordinates.
Syntax
Example
Output: POINT(87.6386 41.8843)
ST_POINTFROMEWKT
Alias for ST_POINT.
Creates a POINT using an EWKT-formatted CHAR as an input argument.
Syntax
Example
Output: POINT(1 2)
ST_POINTFROMGEOJSON
Creates a POINT represented by the specified GeoJSON value as an input argument. A second optional BOOLEAN argument determines if the specified GeoJSON should be converted from a planar to a geodesic representation.
If you specify a NULL value for either argument, the function returns NULL.
Syntax
Examples
In this example, the function captures a POINT from an empty GeoJSON representation.
Output: POINT EMPTY
In this example, the function captures a POINT from a GeoJSON representation.
Output: POINT(1 1)
ST_POINTFROMGEOHASH
Creates a POINT represented by the specified geohash.
Syntax
Examples
Output: POINT(-126.00000000000003 48.00000000000007)
Output: POINT(42.60498046875 -5.60302734375)
ST_POINTFROMTEXT
Alias for ST_POINT(char).
ST_POINTFROMWKB
Alias for ST_POINT(binary).

