ST_ClipDimension
更新时间:
复制 MD 格式
ST_ClipDimension computes the pixel coordinate bounding box in raster space that corresponds to a geographic extent at a specified pyramid level.
Syntax
box ST_ClipDimension(raster raster_obj, integer pyramidLevel, box extent);Parameters
| Parameter | Type | Description |
|---|---|---|
raster_obj | raster | The raster object. Must have a valid spatial reference system identifier (SRID). |
pyramidLevel | integer | The pyramid level at which to compute the pixel coordinates. |
extent | box | The geographic extent of the clipped area in world space coordinates. |
Return value
Returns a box value representing the pixel coordinate range in raster space.
Example
The following example computes the raster space bounding box of a geographic extent at pyramid level 2.
SELECT ST_ClipDimension(raster_obj, 2, '((128.0, 30.0),(128.5, 30.5))')
FROM raster_table
WHERE id = 10;Output:
'((200, 300),(600, 720))'What's next
ST_Clip: Clip a raster object to a specified geographic extent and return the clipped raster.
该文章对您有帮助吗?