Changes between Version 48 and Version 49 of WKTRaster/SpecificationWorking02


Ignore:
Timestamp:
03/10/11 13:45:28 (14 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking02

    v48 v49  
    7272 '''Implementation details'''
    7373
    74  Only the first variant should be implemented in C. Others are pl/pgSQL variants. The C implementation should follow the plpgsql script of the one raster version of ST_MapAlgebra implemented at the top of http://trac.osgeo.org/postgis/browser/spike/wktraster/scripts/plpgsql/st_mapalgebra.sql
     74 Only the first variant should be implemented in C. Others are PL/pgSQL variants. The C implementation should follow the PL/pgSQL script of the one raster version of ST_MapAlgebra implemented at the top of http://trac.osgeo.org/postgis/browser/spike/wktraster/scripts/plpgsql/st_mapalgebra.sql
    7575
    7676 Optimizations should be implemented in many situations:
     
    8787'''ST_SameAlignment(raster, raster)'''
    8888
    89  This function returns true if both raster grid are aligned.
    90 
    91  For two raster to be aligned they must:
    92 
    93   -Share the same pixel scale and skew
    94 
    95   -At least one of any of the four corner of any pixel must fall on on any corner of the grid of the other raster.
    96 
    97  Alignment is not the same concept as georeference. Two raster might be aligned but not have the same georeference.
    98 
    99  To know if two rasters share the same alignment is useful to decide if we must resample one of them before doing another operation (like MapAlgebra on two rasters).
    100 
     89 This function returns true if both rasters' grids are aligned.
     90
     91 Two rasters grid are aligned if:
     92
     93  -They share the same pixel scales and skews
     94
     95  -At least one of any of the four corner of any pixel of one raster fall on any corner of the grid of the other raster.
     96
     97 Alignment is not the same concept as georeference. Two rasters can be aligned but not have the same georeference.
     98
     99 Rotation is important here since two rasters grid might look perfectly aligned but are not if their rotated are different.
     100
     101 Knowing if two rasters share the same alignment is useful when it is time to decide if one of them must be resampled before doing other operations (like ST_MapAlgebra on two rasters).
     102
     103 '''Variants'''
     104
     105  1) ST_SameAlignment(ulx1, uly1, scalex1, scaley1, skewx1, skewy1, ulx2, uly2, scalex2, scaley2, skewx2, skewy2)
     106
     107  2) ST_SameAlignment(rast1 raster, rast2 raster)
     108
     109 The first variant is useful to PL/pgSQL function which have already get the values of the parameters.
     110
     111 '''Implementation Details'''
     112
     113 Only the first variant should be implemented in C. The second one is a PL/pgSQL variants. The C implementation should follow the PL/pgSQL version implemented in http://trac.osgeo.org/postgis/browser/spike/wktraster/scripts/plpgsql/st_mapalgebra.sql
     114
     115 It is not clear if this PL/pgSQL implementation works when raster are rotated. To verify.
     116
     117 
    101118'''ST_MapAlgebra'''
    102119
     
    241258 '''Implementation details'''
    242259
    243  Only variant 1 should be implemented as a C functions. Others variants are plpgsql variants.
     260 Only variant 1 should be implemented as a C functions. Others variants are PL/pgSQL variants.
    244261
    245262 Variant 7 is useful to optimize ST_MapAlgebra.