All Products
Search
Document Center

MaxCompute:ST_GEOGPOINT

Last Updated:Aug 27, 2026

ST_GEOGPOINT constructs a Point geography object from longitude and latitude values.

Syntax

GEOGRAPHY ST_GEOGPOINT(DOUBLE <longitude>, DOUBLE <latitude>)

Parameters

  • longitude: Required. A DOUBLE value. Values outside the [-180, 180] range are wrapped into this range using a modulo 360 operation.

  • latitude: Required. A DOUBLE value. The value must be within the [-90, 90] range. Values outside this range cause an error.

Return value

Returns a Point geography object.

Examples

SELECT ST_GEOGPOINT(lng, lat) as g 
  FROM 
  VALUES (3.0, 4.0), (1000.0, 80), (-1000, -80), (-180, -90), (180, 90) tmp(lng, lat);

-- Returns:
+------------------+
| g                |
+------------------+
| POINT (3 4)      |
| POINT (-80 80)   |
| POINT (80 -80)   |
| POINT (-180 -90) |
| POINT (180 90)   |
+------------------+

Related topics