名称

ST_PixelAsPolygon — 返回包围特定行和列的像素的多边形几何体。

语法

geometry ST_PixelAsPolygon(raster rast, integer columnx, integer rowy);

描述

返回包围特定行和列的像素的多边形几何体。

可用性:2.0.0

示例

-- get raster pixel polygon
SELECT i,j, ST_AsText(ST_PixelAsPolygon(foo.rast, i,j)) As b1pgeom
FROM dummy_rast As foo
    CROSS JOIN generate_series(1,2) As i
    CROSS JOIN generate_series(1,1) As j
WHERE rid=2;

 i | j |                                                    b1pgeom
---+---+-----------------------------------------------------------------------------
 1 | 1 | POLYGON((3427927.75 5793244,3427927.8 5793244,3427927.8 5793243.95,...
 2 | 1 | POLYGON((3427927.8 5793244,3427927.85 5793244,3427927.85 5793243.95, ..
  

另请参阅

ST_DumpAsPolygonsST_PixelAsPolygonsST_PixelAsPointST_PixelAsPointsST_PixelAsCentroidST_PixelAsCentroidsST_IntersectionST_AsText