ST_ClipDimension
Updated at:
Copy as MD
Computes the raster space of a clipped area.
Syntax
box ST_ClipDimension(raster raster_obj, integer pyramidLevel, box extent);Parameters
| Parameter | Type | Description |
|---|---|---|
raster_obj | raster | The raster object. |
pyramidLevel | integer | The pyramid level at which to compute the pixel coordinates. |
extent | box | The area to clip, expressed in world space coordinates. |
Usage notes
The raster object must have a valid spatial reference system identifier (SRID). Without a valid SRID, the function cannot convert world space coordinates to raster space pixel coordinates.
The function returns a box value representing the raster space of the clipped area.
Examples
The following example computes the raster space for the world space extent ((128.0, 30.0),(128.5, 30.5)) at pyramid level 2.
SELECT ST_ClipDimension(raster_obj, 2, '((128.0, 30.0),(128.5, 30.5))')
FROM raster_table
WHERE id = 10;Result:
((200, 300),(600, 720))Is this page helpful?