[GRASS-dev] G7: r.neighbors changes data type from CELL to DCELL

Markus Neteler neteler at osgeo.org
Thu Apr 10 06:33:51 PDT 2014


Hi,

in r59668 and r59669 I have fixed the issue that a map type
(CELL/FCELL/DCELL) was not preserved as expected but always converted
to DCELL.

Now CELL is generated for

    {c_count, w_count, NO_CATS, 0, 0, 1, "count", "count of non-NULL values"},
    {c_divr, NULL, divr_cats, 0, 0, 1, "diversity",
    {c_intr, NULL, intr_cats, 0, 0, 1, "interspersion",

Example:
g.region rast=landuse96_28m
r.info -g landuse96_28m | grep datatype
datatype=CELL
r.neighbors input=landuse96_28m output=landuse96_28m_count7x7 method=count
 100%
r.info -g landuse96_28m_count7x7 | grep datatype
datatype=CELL


Remaining issues:

1) "quantile=0.5" creeps into the history:

r.info landuse96_28m_mode7x7
...
 |    r.neighbors input="landuse96_28m" output="landuse96_28m_mode7x7" met\   |
 |    hod="mode" size=3 quantile=0.5

--> quantile=0.5 should not be there (even if ignored).

2) The method=mode does not preserve CELL (likewise in r.series).

Any suggestion how to fix these two remaining problems?

thanks
Markus


More information about the grass-dev mailing list