Changes between Version 68 and Version 69 of WKTRaster/SpecificationWorking01


Ignore:
Timestamp:
Dec 16, 2009, 1:25:52 PM (14 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking01

    v68 v69  
    203203
    204204 The only difference with ST_Box2D(raster) is that ST_Envelope(raster) returns a geometry, not a BOX2D.
    205  
    206  There is also a ticket (#348) related to this function: http://trac.osgeo.org/postgis/ticket/348
     205
     206
     207 '''Implementation details'''
     208
     209 This function should be implemented as a SQL or a PL/pgSQL function looking like: 'SELECT ST_geometry(ST_Box2D(rast))'
     210
     211 There is already a ST_raster_envelope() function but this has actually the behavior of the  ST_ConvexHull(raster, 'WITHNODATA') described below. There is also a ticket (#348) related to this function: http://trac.osgeo.org/postgis/ticket/348
    207212
    208213'''ST_ConvexHull(raster) -> polygon geometry''' - Returns the minimum convex geometry that encloses every significant pixel from the raster.
     
    210215 By default the resulting polygon TAKES the NODATA values into account. The resulting polygon enclose only pixels having a significant value (different than the NODATA value).
    211216
    212  A ST_ConvexHull(raster, 'WITHNODATA') variant SHOULD NOT TAKE the NODATA value into account. It generally returns a square or rectangle polygon that can be rotated or not depending on the rotation of the raster. If the raster is not rotated ST_ConvexHull(geometry, 'WITHNODATA') is (almost) equivalent to ST_Envelope(raster).
    213 
    214  This variant should replace the actual ST_raster_envelope() function which is wrongly named.
    215 
     217 Variant 1: ST_ConvexHull(raster, 'WITHNODATA') SHOULD NOT TAKE the NODATA value into account. It generally returns a square or rectangle polygon that can be rotated or not depending on the rotation of the raster. If the raster is not rotated ST_ConvexHull(geometry, 'WITHNODATA') is (almost) equivalent to ST_Envelope(raster).
    216218
    217219 '''Implementation details'''
     
    219221 The first variant (taking NODATA values into account) ST_ConvexHull(raster) could be roughly implemented with a SQL or PL/pgSQL function looking like 'SELECT ST_ConvexHull(ST_Shape(raster))'. For sure computing only the external edge (without considering eventual holes like ST_Shape() does) should be faster. This imply writing the equivalent of a more simple version of ST_Shape.
    220222
    221  The second variant (not taking NODATA values into account) is
     223 The second variant (not taking NODATA values into account) is actually already implemented by the ST_raster_envelope() function which is wrongly named. There is also a ticket (#348) related to this function: http://trac.osgeo.org/postgis/ticket/348
    222224
    223225'''ST_Shape(raster) -> polygon geometry''' - Returns a geometry encomparsing every pixel having a significant value (different than the NODATA value).