29 | | Rasterize the geometry as a new raster (ST_AsRaster(geometry, pixeltype, val, nodataval, raster)) and then copy only pixels for which both raster bands have a value. Optionally trim the raster to withvalue extent. |
| 29 | Variant 2: ST_Intersection(raster, band, geometry, val) -> raster |
| 30 | |
| 31 | Variant 3: ST_Intersection(geometry, val, raster) -> raster |
| 32 | |
| 33 | Variant 4: ST_Intersection(raster, geometry, val) -> raster |
| 34 | |
| 35 | The second series of variant return a raster having the minimal extent. |
| 36 | |
| 37 | Variant 5: ST_Intersection(geometry, val, raster, band, 'TRIM') -> raster |
| 38 | |
| 39 | Variant 6: ST_Intersection(raster, band, geometry, val, 'TRIM') -> raster |
| 40 | |
| 41 | Variant 7: ST_Intersection(geometry, val, raster, 'TRIM') -> raster |
| 42 | |
| 43 | Variant 8: ST_Intersection(raster, geometry, val, 'TRIM') -> raster |
| 44 | |
| 45 | Return a two bands raster the first band containing only the pixels from the provided raster intersecting with the geometry and the second band containing the same area filled with the provided value. Non intersecting pixels are filled with nodata values. Variant 1 return a raster having the same extent as the provided raster. Variant 3, 4, 7 and 8 defaults the band number to 1. Variant 5 to 8 "trim" or "crop" the raster to the withvalue extent (removing extra nodata value pixels surrounding the extent of the resulting withvalue extent). |
| 46 | |
| 47 | |
| 48 | Implementation details |
| 49 | |
| 50 | Rasterize the geometry as a new raster (ST_AsRaster(geometry, pixeltype, val, nodataval, raster)) and then copy only pixels for which both raster bands have a value. |
| 51 | Should be implemented as a wrapper around ST_MapAlgebra after rasterizing the geometry to a raster having the same alignment as the raster. |