ST_PixelAsPolygon — 返回包围特定行和列的像素的多边形几何体。
geometry ST_PixelAsPolygon(
raster rast, integer columnx, integer rowy)
;
-- 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, ..