Changes between Version 126 and Version 127 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Jul 6, 2011, 1:18:36 PM (13 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v126 v127  
    5050 -“FIRST_SEGMENT_LENGTH”. The pixelsize is set to the length of the first line segment encountered in the geometry. This is useful when reconverting to raster polygons vectorized from rasters (with ST_DumpAsPolygon() or ST_Intersection()). In this case, all segments are of the same length which is the original raster pixel size. This is useful only when alignment is not specified. If the geometry is a point, return an error.[[BR]]
    5151 -Default is the smallest of the width or height of the extent of the source geometry divided by 250. If the smallest of the width or height of the extent of the source geometry is zero then a warning is reported an no NULL is returned.
     52
     53 * It would be interesting to have an option to create a second band with the length of the line or the area of polygon intersecting each pixel. This band could then be used in a subsequent ST_Union() to decide which pixel value to burn (the one with the longest length of the biggest area). For this to be useful ST_Union should work with a ST_MapAlgebra(rast1, rast2) able to refer to pixel value in any band. e.g. rast1.2 referring to the pixel value in the second band. The ST_Union(rast, 'MAX_LENGTH') aggregate could then be implemented with the following state expression: 'CASE WHEN rast1.2 > rast2.2 THEN rast1.1 ELSE rast2.1 ENDIF'. ST_Union(rast, 'MAX_COMBINED_LENGTH') could also use a ST_MapAlgebra(rast1, rast2) able to take a custom user function. The state function that would accumulate, in a temporary table, the total length for a same value over every overlapping pixels and the final function would determine which of the values from the table is the right one to burn in the final raster pixel.
    5254
    5355 '''Variants'''