Nome

ST_X — Returns the X coordinate of a Point.

Sinopse

float ST_X(geometry a_point);

Descrição

Retorna a coordenada X do ponto, ou NULA se não estiver disponível. Entrada deve ser um ponto.

[Nota]

To get the minimum and maximum X value of geometry coordinates use the functions ST_XMin and ST_XMax.

This method implements the SQL/MM specification. SQL-MM 3: 6.1.3

This function supports 3d and will not drop the z-index.

Exemplos

Code
SELECT ST_X('POINT(1 2 3 4)');
Raster Outputs
1
Code
SELECT ST_Y(ST_Centroid('LINESTRING(1 2 3 4,1 1 1 1)'::geometry));
Raster Outputs
1.5