Name

reclassarg — A composite type used as input into the ST_Reclass function defining the behavior of reclassification.

Description

A composite type used as input into the ST_Reclass function defining the behavior of reclassification.

nband integer

The band number of band to reclassify.

reclassexpr text

range expression consisting of comma delimited range:map_range mappings. : to define mapping that defines how to map old band values to new band values. ( means >, ) means less than, ] < or equal, [ means > or equal

1. [a-b] = a <= x <= b

2. (a-b] = a < x <= b

3. [a-b) = a <= x < b

4. (a-b) = a < x < b

( notation is optional so a-b means the same as (a-b)

pixeltype text

One of defined pixel types as described in ST_BandPixelType

nodataval double precision

Value to treat as no data. For image outputs that support transparency, these will be blank.

Example: Reclassify band 2 as an 8BUI where 255 is nodata value

SELECT ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', 255)::reclassarg;

Example: Reclassify band 1 as an 1BB and no nodata value defined

SELECT ROW(1, '0-100]:0, (100-255:1', '1BB', NULL)::reclassarg;

See Also

ST_Reclass