[GRASS-dev] [GRASS GIS] #2705: r.clump maintain original categories

#2705: r.clump maintain original categories
------------------------------------+-------------------------
Reporter: lucadelu | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: major | Milestone: 7.0.1
Component: Raster | Version: unspecified
Keywords: r.clump classification | CPU: Unspecified
Platform: Unspecified |
------------------------------------+-------------------------
r.clump should be able to maintain the categories of original raster, this
is really useful for classified maps.

An example

{{{
i.group group=lsat7_2000 sub=lsat7_2000
in=lsat7_2000_10,lsat7_2000_20,lsat7_2000_30,lsat7_2000_40,lsat7_2000_50,lsat7_2000_61,lsat7_2000_70,lsat7_2000_80

i.cluster group=lsat7_2000 sub=lsat7_2000 signature=cluster_sign classes=5

# the output has 5 classes
i.maxlik group=lsat7_2000 sub=lsat7_2000 signaturefile=cluster_sign
output=lsat7_2000_maxlik
# the output now has something like 21000 classes, it should be able to
maintain the 5 original classes
r.clump in=lsat7_2000_maxlik out=lsat7_2000_maxlik_clump
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2705&gt;
GRASS GIS <http://grass.osgeo.org>

#2705: r.clump maintain original categories
--------------------------+------------------------------------
  Reporter: lucadelu | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: major | Milestone: 7.0.1
Component: Raster | Version: unspecified
Resolution: | Keywords: r.clump classification
       CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------------

Comment (by marisn):

Sorry, Luca, but I fail to see an use case here. r.clump identifies
separate objects in a raster map, thus it is useful only if a new category
number is assigned to the new object. Your proposed change would just
write out an output map that matches the input map without any changes.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2705#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>