ST_ASBINARY
Alias of ST_ASWKB. Returns the well-known binary (WKB) representation of the specified geography. SyntaxSQL
Example
SQL
010100000000000000000000400000000000000040
ST_ASGEOJSON
Returns the GeoJSON representation of the specified geography using the IETF standards.SQL
Examples
This example converts a
POINT value into a GeoJSON representation.
SQL
Text
POINT value.
SQL
Text
LINESTRING value into a GeoJSON representation.
SQL
Text
LINESTRING value.
SQL
Text
LINESTRING value into a GeoJSON representation.
SQL
Text
POLYGON value into a GeoJSON representation.
SQL
Text
POLYGON value.
SQL
Text
POLYGON, which results in a LINESTRING type in the GeoJSON representation.
SQL
Text
POLYGON, which results in a POINT type in the GeoJSON representation.
SQL
Text
POLYGON value into a GeoJSON representation.
SQL
Text
ST_ASLATLONTEXT
Returns a string that represents geographic coordinates of a specifiedPOINT in the specified format.
SQL
Example
SQL
'2.0 degrees 19.50 minutes S 10.0 degrees 14.05 minutes E'
ST_ASTEXT
Alias of ST_ASWKT and ST_EWKT. Returns the well-known text (WKT) representation of the specified geography. If you useST_ASEWKT, the database prepends the resultant string with SRID=4326;.
SQL
Example
SQL
POLYGON((1 2, 1 3, 1 3, 1 2))
ST_ASEWKT
For usage, see ST_ASTEXT.ST_ASWKT
Alias of ST_ASTEXT.ST_ASWKB
Alias of ST_ASBINARY.ST_GEOHASH
Returns a string that represents the geohash of the inputPOINT. This function also accepts an optional second argument to specify the length of the geohash result.
If you specify any argument as NULL, then the function returns NULL.
SQL
Example
SQL
c0w3hc0w3hf1s70w3hf1s70w3

