[GRASS-user] i.maxlik: strange classification output and reject map

Moritz Lennert mlennert at club.worldonline.be
Mon Dec 21 05:29:35 PST 2015


On 20/12/15 14:43, Umberto Filippo Minora wrote:
> I have three maps which are 1) shortwave infrared reflectances derived
> from Landsat ETM+ (Data Type: FCELL); 2) cumulative solar radiation
> derived using "r.sun" from GRASS (Data Type: FCELL); 3) elevation map
> (DEM, Data Type: CELL).
> I am trying to perform a supervised maximum likelihood classification
> over these bands.
> So, first I grouped them using "i.group".
> Then I imported a shp with rock glacier areas, created a new column in
> its attribute table called "IDmaxlik" and assigned a value of "1" (int)
> to it.
> Then I converted the shp to raster with this command:
>
>       v.to.rast in=rg_visible out=rg_visible use=attr
> attribute_column=IDmaxlik
>
> and I used "i.gensig" to generate the signature file.
>
>       i.gensig trainingmap=rg_visible group=perma_max subgroup=perma_max
> signaturefile=rg_sig
>
> Finally, I run "i.maxlik":
>
>       i.maxlik group=perma_max subgroup=perma_max signaturefile=rg_sig
> output=classification01 reject=classification01_reject
>
> Each pixel of the output map ("classification01") is 1, as if the
> everything was classified as "rock glacier". Moreover, the reject map
> ("classification01_reject"), has higher values (closer to 16, or 100%)
> over the same rock glaciers used as the region of interest than elsewhere.
>
> Might be the problem related to the fact that "i.gensig" expected a clip
> of the RGB raster on the ROIs, rather than a mask?

No, I think the problem stems from the fact that you only provide one 
class, so each pixel is attributed to that class. If the rest of the 
area is quite heterogeneous you should probably even create several 
other classes and respective training areas.

Moritz


More information about the grass-user mailing list