Changes between Version 111 and Version 112 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Jun 13, 2011, 3:15:50 PM (13 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v111 v112  
    146146'''Details for 5) to 8) Two rasters versions'''
    147147
    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.
    153153
    154154 One of the implications of this is that users should add a WHERE clause to avoid useless computation with non-overlapping rasters. This is the same principle as with ST_Intersection(). Hence:
     
    157157  SELECT ST_MapAlgebra(rast1, rast2, mathExpr) FROM mytable
    158158
    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).
    160165
    161166 Replacement expressions can be provided as parameter for when:
    162167
    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'''
    168173
    169174 '''Open Question:'''