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
| Parameter | Type | Required | Description |
|---|---|---|---|
lon | DOUBLE | Yes | X coordinate (or longitude in projected systems) |
lat | DOUBLE | Yes | Y 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
f1 := ST_ASTEXT(ST_GEOMPOINT(1.0, 2.0)), -- Simple point (WKT via ST_ASTEXT)
f2 := ST_ASTEXT(ST_GEOMPOINT(-122.4194, 37.7749)) -- Coordinates for San Francisco
;Result
| f1 VARCHAR | f2 VARCHAR |
|---|---|
| POINT (1 2) | POINT (-122.4194 37.7749) |
On this page