ST_XMin

更新时间:
复制 MD 格式

Returns the minimum X-coordinate of a raster object's bounding box, optionally at a specified pyramid level.

Syntax

float8 ST_XMin(raster raster_obj)
float8 ST_XMin(raster raster_obj, integer pyramid)

Parameters

ParameterDescription
raster_objThe raster object.
pyramidThe pyramid level. Valid values start from 0.

Usage notes

ST_XMin returns 0 if the raster object has not been georeferenced.

Examples

Query the minimum X-coordinate of a raster column:

SELECT ST_XMin(rast)
FROM raster_table;

Result:

 st_xmin
----------
      120

Query the minimum X-coordinate at pyramid level 1:

SELECT ST_XMin(rast, 1)
FROM raster_table;

See also

  • ST_XMax: Returns the maximum X-coordinate of a raster object.

  • ST_YMin: Returns the minimum Y-coordinate of a raster object.

  • ST_YMax: Returns the maximum Y-coordinate of a raster object.