148 | | Both rasters must have the same SRID. If not, ST_MapAlgebra should return an error: "ERROR: Operation on two geometries with different SRIDs" |
149 | | |
150 | | Both raster must be aligned. This is determined using the ST_SameAlignment() function described below. If a resampling is necessary they use the planned ST_Resample() function to resample the second raster to the first one before processing (or the first to the second if an optional parameter is provided). If ST_Resample() is not yet implemented when these functions are implemented, just return an error message: "ERROR: MapAlgebra on rasters with different alignment not yet implemented." |
151 | | |
152 | | Both raster must overlap. This is determined using ST_Intersects(raster, raster) (to be implemented). If they don't overlap an empty raster is returned. |
| 148 | -Both rasters must have the same SRID. If not, ST_MapAlgebra should return an error: "ERROR: Operation on two geometries with different SRIDs" |
| 149 | |
| 150 | -Both raster must be aligned. This is determined using the ST_SameAlignment() function described below. If a resampling is necessary they use the planned ST_Resample() function to resample the second raster to the first one before processing (or the first to the second if an optional parameter is provided). If ST_Resample() is not yet implemented when these functions are implemented, just return an error message: "ERROR: MapAlgebra on rasters with different alignment not yet implemented." |
| 151 | |
| 152 | -Both raster must overlap. This is determined using ST_Intersects(raster, raster) (to be implemented). If they don't overlap an empty raster is returned. |
159 | | The computation extent can be FIRST, SECOND, INTERSECTION, UNION. |
| 159 | -The computation extent (extentexpr in the functions below) can be: |
| 160 | |
| 161 | -'FIRST' (the extent of the first raster),[[BR]] |
| 162 | -'SECOND' (the extent of the first raster),[[BR]] |
| 163 | -'INTERSECTION' (the extent of the intersection of both rasters),[[BR]] |
| 164 | -'UNION' (the extent of the union of both rasters). |
163 | | -The first raster value is nodata[[BR]] |
164 | | -The second raster value is nodata[[BR]] |
165 | | -Both rasters values when they are both nodata |
166 | | |
167 | | '''ST_MapAlgebraExpr(raster rast, integer band, text expression, text nodatavalueexpr, text pixeltype) -> raster''' |
| 168 | -The first raster value is nodata (nodata1expr in the functions below)[[BR]] |
| 169 | -The second raster value is nodata (nodata2expr in the functions below)[[BR]] |
| 170 | -Both rasters values when they are both nodata (nodatanodataexpr in the functions below) |
| 171 | |
| 172 | '''5) ST_MapAlgebraExpr(rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extentexpr text, nodata1expr text, nodata2expr text, nodatanodataexpr text) -> raster''' |