[GRASS-dev] G7: r.neighbors changes data type from CELL to DCELL
Martin Landa
landa.martin at gmail.com
Mon May 19 07:49:31 PDT 2014
2014-05-19 15:08 GMT+02:00 Glynn Clements <glynn at gclements.plus.com>:
> r60346 implements the following logic:
>
> For any aggregate, there are 2 factors affecting the output type:
>
> 1. Whether the input map is integer or floating-point.
> 2. Whether the weighted or unweighted version of the aggregate is used.
>
> These combine to create 4 possibilities:
>
> type integer integer float float
> weighted no yes no yes
>
> average float float float float
> median [1] [1] float float
> mode integer integer [2] [2]
> minimum integer integer float float
> maximum integer integer float float
> range integer integer float float
> stddev float float float float
> sum integer float float float
> count integer float integer float
> variance float float float float
> diversity integer integer integer integer
> interspersion integer integer integer integer
> quart1 [1] [1] float float
> quart3 [1] [1] float float
> perc90 [1] [1] float float
> quantile [1] [1] float float
>
> [1] For integer input, quantiles may produce float results from
> interpolating between adjacent values.
>
> [2] Calculating the mode of floating-point data is essentially
> meaningless.
>
> With the current aggregates, there are 5 cases:
>
> 1. Output is always float: average, variance, stddev, quantiles (with
> interpolation).
>
> 2. Output is always integer: diversity, interspersion.
>
> 3. Output is integer if unweighted, float if weighted: count.
>
> 4. Output matches input: minimum, maximum, range, mode (subject to
> note 2 above), quantiles (without interpolation).
>
> 5. Output is integer for integer input and unweighted aggregate,
> otherwise float: sum.
would be nice to put to the manual I guess. Martin
--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
More information about the grass-dev
mailing list