Changes between Version 45 and Version 46 of WKTRaster/SpecificationFinal01


Ignore:
Timestamp:
Sep 3, 2010, 1:49:57 PM (14 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationFinal01

    v45 v46  
    179179 '''Variants'''
    180180
    181   1) ST_Polygon(raster, integer) -> polygon geometry
    182 
    183   2) ST_Polygon(raster) -> polygon geometry -- default to band # 1
     181  1) ST_Polygon(raster) -> polygon geometry -- default to band # 1
    184182
    185183 '''Implementation details'''
     
    197195 '''Variants'''
    198196
    199   1) ST_DumpAsPolygons(raster, integer) -> geomval set
    200 
    201   2) ST_DumpAsPolygons(raster) -> geomval set -- default to band # 1
     197  1) ST_DumpAsPolygons(raster) -> geomval set -- default to band # 1
    202198
    203199 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_Reclass(raster,...) function) before using ST_DumpAsPolygons().
     
    277273 Returns a set of "geomval" value representing the shared portion of the geometry and the raster band areas sharing a common meaningfull values. The integer parameter is the band number of the raster.
    278274
     275 This is a set-returning function (SRF). It returns a set of "geomval" representing the point set intersection of the geometry and the areas of the raster sharing a common meaningfull value (NODATA values ARE taken into account). The raster is first polygonised using ST_DumpAsPolygons(raster) and ST_Intersection(geometry, geometry) is then performed between the provided geometry and all the geometries resulting from the polygonisation of the raster.
     276
     277 If the geometries do not share any space (are disjoint), then an empty geometry collection is returned.
     278
     279 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.
     280
     281 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:
     282
     283  ST_Intersection(ST_ConvexHull(raster), geometry)
     284
     285 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:
     286
     287  ST_Intersection(ST_Polygon(raster), geometry)
     288
    279289 '''Variants'''
    280290
    281   1) ST_Intersection(raster, geometry) -> geometry -- default to band # 1
     291  1) ST_Intersection(raster, geometry) -> geometry
    282292
    283293  2) ST_Intersection(geometry, raster, integer) -> geometry -- the integer parameter is the band number of the raster
    284294
    285   3) ST_Intersection(geometry, raster) -> geometry -- default to band # 1
    286 
    287 
    288  This is a set-returning function (SRF). It returns a set of "geomval" representing the point set intersection of the geometry and the areas of the raster sharing a common meaningfull value (NODATA values ARE taken into account). The raster is first polygonised using ST_DumpAsPolygons(raster) and ST_Intersection(geometry, geometry) is then performed between the provided geometry and all the geometries resulting from the polygonisation of the raster.
    289 
    290  If the geometries do not share any space (are disjoint), then an empty geometry collection is returned.
    291 
    292  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.
    293 
    294  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:
    295 
    296   ST_Intersection(ST_ConvexHull(raster), geometry)
    297 
    298  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:
    299 
    300   ST_Intersection(ST_Polygon(raster), geometry)
     295  3) ST_Intersection(geometry, raster) -> geometry
     296
     297 Variants 1 and 2 default the band number to 1.
    301298
    302299 '''Implementation details'''
     
    308305 
    309306
    310 '''ST_SetSRID(raster, integer)'''
     307'''ST_SetSRID(raster, integer) -> raster'''
    311308
    312309 Sets the spatial reference on the specified raster. This is the same as the ST_SetSRID function working on geometries.
    313310
    314 '''ST_SetPixelSize(raster, pixelsize)'''
    315 
    316  '''Variants'''
    317 
    318   1) ST_SetPixelSize(raster, pixelsize)
    319 
    320   2) ST_SetPixelSize(raster, xsize, ysize)
    321 
    322  Sets the pixel size (cell size) on the specified raster. The base method sets the X and Y pixel size to the same value. Variant 2 sets the pixel sizes to the individually specified x and y sizes.
     311'''ST_SetPixelSize(raster, pixelsize) -> raster'''
     312
     313 Sets the pixel size (cell size) on the specified raster. The base method sets the X and Y pixel size to the same value.
     314
     315 '''Variants'''
     316
     317  1) ST_SetPixelSize(raster, xsize, ysize) -> raster
     318
     319 Variant 1 sets the pixel sizes to the individually specified x and y sizes.
    323320
    324321'''ST_SetBandNoDataValue(raster, band, value)'''
     
    326323 Sets the value that corresponds to NODATA in the given raster's band.
    327324
    328 '''ST_SetGeoReference(raster, georef)'''
    329 
    330  '''Variants'''
    331 
    332   1) ST_SetGeoReference(raster, georef, format)
    333 
    334   2) ST_SetGeoReference(raster, georef)
    335 
    336  Sets the georeference fields of the raster (pixel size, skew, upper left location) all in one pass. The 'format' parameter is optional, and defaults to 'GDAL' georeference format if it is not specified.
     325'''ST_SetGeoReference(raster, georef text, format text) -> raster'''
     326
     327 Sets all the georeference fields of the raster (pixelsize X, pixelsize Y, skew X, skew Y, upper left X, upper left Y) using the specified string. Format might be 'GDAL' or 'ESRI'. The GDAL format expect the upper left X and Y to be the upperleft corner of the upper left pixel and the ESRI format expect the upper left X and Y to be the upperleft center of the upper left pixel.
     328
     329 '''Variants'''
     330
     331  1) ST_SetGeoReference(raster, georef text) -> raster
     332
     333 Variant 1 default format to 'GDAL'.
    337334
    338335 If this function does not receive a georeference string with 6 parameters (or if one of the parameters is not numeric), it raises an exception "st_setgeoreference requires a string with 6 floating point values". If this method receives a NULL raster, it does nothing, and returns a NULL raster.
    339336
    340 '''ST_SetSkew(raster, skewx, skewy)'''
    341 
    342  '''Variants'''
    343 
    344   1) ST_SetSkew(raster, skewx, skewy)
    345 
    346   2) ST_SetSkew(raster, skew)
    347 
    348  Set the skewx and the skewy of the raster's georeference. Variant 2 sets the X and Y skew to the same value.
    349 
    350 '''ST_SetUpperLeft(raster, left, top)'''
     337'''ST_SetSkew(raster, skewx, skewy) -> raster'''
     338
     339 Set the skewx and the skewy of the raster's georeference.
     340
     341 '''Variants'''
     342
     343  1) ST_SetSkew(raster, skew)
     344
     345 Variant 1 sets the X and Y skew to the same value.
     346
     347'''ST_SetUpperLeft(raster, left, top) -> raster'''
    351348
    352349 Sets the location of the upper left pixel (cell). The base method sets the X and Y coordinates to the individually specified left and top coordinates. 
     
    361358'''ST_BandPath(raster, band) -> string'''
    362359
    363  Return the path of the filesystem raster associated with this band. The band does not contain any pixel value.
     360 Returns the path of the filesystem raster associated with this band. The band does not contain any pixel value.
    364361
    365362----
     
    447444'''ST_BandHasNoDataValue(raster, band)'''
    448445
    449  Return TRUE if the value stored as a NODATA value for the band must be interpreted as a real NODATA value.
     446 Returns TRUE if the value stored as a NODATA value for the band must be interpreted as a real NODATA value.
    450447
    451448'''ST_SetBandHasNoDataValue(raster, band)'''
     
    458455'''ST_Value(raster, band, x, y)'''
    459456
    460 Return the value (as a double precision number) of the pixel located at x, y in the specified band.
     457 Returns the value (as a double precision number) of the pixel located at x, y in the specified band.
    461458
    462459'''ST_SetValue(raster, band, x, y, val)'''
    463460
    464 Set the value of the pixel located at x, y in the specified band. Return the modified raster.
     461 Set the value of the pixel located at x, y in the specified band. Returns the modified raster.
    465462
    466463----