Changes between Version 107 and Version 108 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Jun 13, 2011, 2:36:17 PM (13 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v107 v108  
    95958) '''ST_MapAlgebraFct() -''' A two rasters version taking a '''table name and a raster column name''' (in order to work on a '''tiled coverage''') and a '''user defined function''' (with optional parameters) of two pixels at a time, one from each rasters. The function is a user defined PL/pgSQL function taking two float8 values and returning one value. Non-existent values are found in the neighbour tiles when possible.
    9696
    97 
     97Parameters and details for each variant follow...
     98
     99'''ST_MapAlgebraExpr(raster rast, integer band, text expression, text nodatavalueexpr, text pixeltype) -> raster'''
     100
     101This function is [http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebra.html implemented].
    98102
    99103'''Details for 3) ST_MapAlgebraFctNgb()'''
     
    179183'''ST_MapAlgebra on two rasters'''
    180184
    181  Specifications of ST_MapAlgebra on two rasters are still in progress as a new optimised version, filling large areas of same value more quickly, is planned. See http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_mapalgebra_optimized.sql
    182 
    183  See discussion in http://trac.osgeo.org/postgis/ticket/590
    184 
    185 ----
    186 == '''Objective FV.04 - Being able to use "group by" to accumulate tiles to form a new raster.''' ==
    187  
    188 
    189 '''ST_Union(raster|geometry, raster|geometry, 'raster'|'geometry') -> raster/geometry'''[[BR]]
    190 '''ST_Accum(raster set|geometry set, 'raster'|'geometry') -> raster/geometry'''
    191 
    192 
    193 ----
    194 == '''Objective FV.06 - Being able to do some base raster operations.''' ==
    195  
    196 
    197 '''ST_Area(raster|geometry) -> double'''[[BR]]
    198 
    199 
    200 ----
    201 
    202 '''ST_Resample(raster, method, originx, originy, pixelsizex, pixelsizey) -> raster'''
    203 
    204  '''Variant'''
    205 
    206   1) ST_Resample(raster, method, raster) -> raster
    207 
    208  Recompute a raster in order to change its pixel size and/or the position of its upper left corner.
    209 
    210  The second parameter is the resampling method performed when computing new pixel values:
    211   1) 'NEAREST NEIGHBOR'[[BR]]
    212   2) 'LINEAR'[[BR]]
    213   3) 'BICUBIC'
    214 
    215  The 3rd or 3rd-6th parameters define the pixel size of the resampling operation. For the 3rd parameter variant, the pixel size is taken from the pixel size of the raster parameter. For the 3rd-6th parameter variant, the pixel origin and dimensions are explicitly defined.
    216 
    217 '''ST_SelectByValue(raster|geometry, 'expression') -> same type as first argument'''[[BR]]
    218 ~~'''ST_Reclass(raster|geometry,string) -> same type as first argument'''[[BR]]~~
    219 
    220 ~~Bborie: Implementation has been moved to FV.01 above.~~
    221 
    222 '''ST_MapAlgebra(raster|geometry, [raster|geometry, ...] 'mathematical expression', 'raster' |'geometry') -> raster/geometry'''
    223 
    224  Variant 1: ST_MapAlgebra(raster|geometry, [raster|geometry, ...] 'mathematical expression', 'raster' |'geometry', originx, originy, pixelsizex, pixelsizey) -> raster/geometry
    225 
    226  Variant 2: ST_MapAlgebra(raster|geometry, [raster|geometry, ...] 'mathematical expression', 'raster' |'geometry', integer) ->raster/geometry
    227 
    228  Variant 3: ST_MapAlgebra(raster|geometry, [raster|geometry, ...] 'mathematical expression', 'raster' |'geometry', raster) ->raster/geometry
    229 
    230  ST_MapAlgebra performs the specified mathematical expression on the input rasters, returning a raster or geometry.  Both rasters must have the same SRID.  If both rasters do not have the same SRID, ST_MapAlgebra will return an error:
    231   ERROR:  Operation on two geometries with different SRIDs
     185'''ST_MapAlgebraExpr(raster rast, integer band, text expression, text nodatavalueexpr, text pixeltype) -> raster'''
     186
     187 ST_MapAlgebra performs the specified mathematical expression on the input raster, returning a raster.  Both rasters must have the same SRID.  If both rasters do not have the same SRID, ST_MapAlgebra should return an error: "ERROR:  Operation on two geometries with different SRIDs"
    232188
    233189 The first raster passed to ST_MapAlgebra is the 'master' raster, unless either:
    234   1 additional parameter specifies the index (in the parameter list) of the 'master' raster.[[BR]]
    235   1 additional parameter specifies a raster whose origin and cell size should be used to compute the output raster.[[BR]]
    236   4 additional parameters are passed specifying the origin, cell size, and raster rotation.
    237 
    238  This function implicitly calls ST_Intersects(raster|geometry, [raster|geometry, ...]) to detect if the rasters are overlapping before performing any computation. Additionally, the resulting raster will have the same extent as the result of ST_Intersection(raster, integer, geometry).
     190  - one (1) additional parameter specifies the index (in the parameter list) of the 'master' raster.[[BR]]
     191  - one (1) additional parameter specifies a raster whose origin and cell size should be used to compute the output raster.[[BR]]
     192  - four (4) additional parameters are passed specifying the origin, cell size, and raster rotation.
     193
     194 This function implicitly calls ST_Intersects(raster, raster]) to detect if the rasters are overlapping before performing any computation. Additionally, the resulting raster will have the same extent as the result of ST_Intersection(raster, integer, geometry).
    239195
    240196 One of the implications of the ST_Intersects inclusion is that:
     
    249205        PR: I think this would greatly contribute to simplify the API.
    250206
     207 Specifications of ST_MapAlgebra on two rasters are still in progress as a new optimised version, filling large areas of same value more quickly, is planned. See http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_mapalgebra_optimized.sql
     208
     209 See discussion in http://trac.osgeo.org/postgis/ticket/590
     210
     211----
     212== '''Objective FV.04 - Being able to use "group by" to accumulate tiles to form a new raster.''' ==
     213 
     214
     215'''ST_Union(raster|geometry, raster|geometry, 'raster'|'geometry') -> raster/geometry'''[[BR]]
     216'''ST_Accum(raster set|geometry set, 'raster'|'geometry') -> raster/geometry'''
     217
     218
     219----
     220== '''Objective FV.06 - Being able to do some base raster operations.''' ==
     221 
     222
     223'''ST_Area(raster|geometry) -> double'''[[BR]]
     224
     225
     226----
     227
     228'''ST_Resample(raster, method, originx, originy, pixelsizex, pixelsizey) -> raster'''
     229
     230 '''Variant'''
     231
     232  1) ST_Resample(raster, method, raster) -> raster
     233
     234 Recompute a raster in order to change its pixel size and/or the position of its upper left corner.
     235
     236 The second parameter is the resampling method performed when computing new pixel values:
     237  1) 'NEAREST NEIGHBOR'[[BR]]
     238  2) 'LINEAR'[[BR]]
     239  3) 'BICUBIC'
     240
     241 The 3rd or 3rd-6th parameters define the pixel size of the resampling operation. For the 3rd parameter variant, the pixel size is taken from the pixel size of the raster parameter. For the 3rd-6th parameter variant, the pixel origin and dimensions are explicitly defined.
     242
     243'''ST_SelectByValue(raster|geometry, 'expression') -> same type as first argument'''[[BR]]
    251244'''ST_Clip(raster|geometry,geometry) -> same type as first argument'''[[BR]]
    252245'''ST_Flip(raster|geometry, 'vertical'|'horizontal') -> same type as first argument'''