ST_GEOMPOINT()

All functions > GEOSPATIAL > ST_GEOMPOINT()

Creates a GEOMETRY point from x and y coordinates.

Signatures

Geometry point

Returns: A geometry point

ST_GEOMPOINT(lon: DOUBLE, lat: DOUBLE) → GEOM_POINT
sql
ParameterTypeRequiredDescription
lonDOUBLEYesX coordinate (or longitude in projected systems)
latDOUBLEYesY coordinate (or latitude in projected systems)

Signature notes:

  • Coordinates are in the units of the spatial reference system
  • For WGS84 lon/lat use ST_GEOGPOINT instead, which returns a GEOGRAPHY with spherical semantics
  • Returns NULL if either coordinate is NULL

Aliases

  • ST_GEOMPOINT

Examples

FeatureQL
SELECT
    -- Simple point (WKT via ST_ASTEXT)
    f1 := ST_ASTEXT(ST_GEOMPOINT(1.0, 2.0)),
    -- Coordinates for San Francisco
    f2 := ST_ASTEXT(ST_GEOMPOINT(-122.4194, 37.7749))
;
Result
f1 VARCHARf2 VARCHAR
POINT (1 2)POINT (-122.4194 37.7749)

Last update at: 2026/06/20 10:08:10