Changes between Version 98 and Version 99 of WKTRaster/SpecificationWorking01


Ignore:
Timestamp:
Jan 5, 2010, 1:25:27 PM (14 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking01

    v98 v99  
    243243[[Image(WKTRasterEnvelopeConvexHullAndShape.gif)]]
    244244
    245 '''ST_ConvexHull(raster) -> polygon geometry''' - Returns the minimum convex geometry that encloses every significant pixel from the raster.
    246 
    247  The resulting polygon DOES NOT TAKE the NODATA values into account. The resulting polygon enclose every pixel, even those containing NODATA values. It can be rotated or not depending on the rotation of the raster. If the raster is not rotated ST_ConvexHull(geometry) is (almost) equivalent to ST_Envelope(raster).
     245'''ST_ConvexHull(raster) -> polygon geometry''' - Returns the minimum convex geometry that encloses every pixel from the raster.
     246
     247 The resulting polygon DOES NOT TAKE the NODATA values into account. The resulting polygon enclose every pixel, even those containing NODATA values. The resulting polygon can be rotated or not depending on the rotation of the raster. If the raster is not rotated ST_ConvexHull(geometry) is (almost) equivalent to ST_Envelope(raster) (ST_Envelope floor the coordinates and hence add a little buffer around the raster).
    248248
    249249 '''Implementation details'''
     
    259259 This function could be roughly implemented as a SQL function looking like 'SELECT ST_Collect((ST_AsPolygon(raster)).geom)'. For sure a more specialised version could be faster than ST_AsPolygon.
    260260
    261 '''ST_AsPolygon(raster) -> geomval set''' - Returns a set of "geomval" value, one for each contiguous group of pixel sharing the same value.
    262 
    263  This is a set-returning function (SRF). A "geomval" value is a complex type composed of a polygon geometry (one for each contiguous group of pixel sharing the same value) and the value associated with this geometry. These values are always returned as a value of type double precision. The shape of each polygon follow pixels edges.
     261'''ST_AsPolygon(raster) -> geomval set''' - Returns a set of "geomval" value, one for each group of pixel sharing the same value.
     262
     263 This is a set-returning function (SRF). A "geomval" value is a complex type composed of a polygon geometry (one for each group of pixel sharing the same value) and the value associated with this geometry. These values are always returned as a value of type double precision. The shape of each polygon follow pixels edges.
    264264
    265265 This function should be used with precaution on raster with float pixel type as it could return one "geomval" (or polygon) per pixel. This kind of raster should be reclassified (using the planned ST_Reclassify(raster,...) function) before using ST_AsPolygon().
     
    290290[[Image(WKTRasterAsPolygon.gif)]]
    291291
    292 '''ST_AsWKTPolygon(raster) -> wktgeomval set''' - Returns a set of "geomval" value, one for each contiguous group of pixel sharing the same value.
    293 
    294  This is a set-returning function (SRF). A "wktgeomval " value is a complex type composed of a the wkt representation of a geometry (one for each contiguous group of pixel sharing the same value) and the value associated with this geometry. These values are always returned as a value of type double precision. The shape of each polygon follow pixels edges.
     292'''ST_AsWKTPolygon(raster) -> wktgeomval set''' - Returns a set of "geomval" value, one for each group of pixel sharing the same value.
     293
     294 This is a set-returning function (SRF). A "wktgeomval " value is a complex type composed of a the wkt representation of a geometry (one for each group of pixel sharing the same value) and the value associated with this geometry. These values are always returned as a value of type double precision. The shape of each polygon follow pixels edges.
    295295
    296296 This function should be used with precaution on raster with float pixel type as it could return one "geomval" (or polygon) per pixel. This kind of raster should be reclassified (using the planned ST_Reclassify(raster,...) function) before using ST_AsWKTPolygon().
     
    355355 ST_Intersection in conjunction with ST_Intersects is very useful for clipping geometries such as in bounding box, buffer, region queries where you only want to return that portion of a geometry that sits in a country or region of interest.
    356356
    357  If you only want to compute the intersection between the convex hull of the raster without polygonising it to group of contiguous pixels sharing a common value, do:
     357 If you only want to compute the intersection between the convex hull of the raster without polygonising it to group of pixels sharing a common value, do:
    358358
    359359  ST_Intersection(ST_ConvexHull(raster), geometry)
    360360
    361  If you only want to compute the intersection between the shape of the raster without polygonising it to group of contiguous pixels sharing a common value, do:
     361 If you only want to compute the intersection between the shape of the raster without polygonising it to group of pixels sharing a common value, do:
    362362
    363363  ST_Intersection(ST_Shape(raster), geometry)