This function returns the coordinate range of a raster object. The return value is a box object of PostgreSQL in the format of '((minX,minY),(maxX,maxY))'.

Syntax

BOX ST_Extent(raster raster_obj,CoorSpatialOption csOption = 'WorldFirst')

Parameters

Parameter Description
raster_obj The raster object.
CoorSpatialOption The coordinate type.

Description

The CoorSpatialOption parameter specifies the coordinate type. Valid values:

  • Raster: returns pixel coordinates.
  • World: returns world coordinates.
  • WorldFirst: preferentially returns world coordinates. If the raster object is geographically referenced, the function returns world coordinates. If the raster object is not geographically referenced, the function returns pixel coordinates.

Examples

select ST_Extent(raster_obj, 'Raster') from raster_table;

__________________________________
(0 0, 255 255)