GME

Geospatial Modelling Environment

generalizeregions

Generalizes / simplifies a thematic raster dataset based on the size of groups of contiguous pixels of the same value

Description

This tool generalizes / simplifies a thematic (categorical) raster dataset by recoding the smallest contiguous groups of pixels of the same value with the pixel value of the largest neighbouring group. You must run the regiongroup command before running this command as the output of the regiongroup command serves as the input to this command.

The cell neighbourhood that is evaluated can be all eight cells that surround a cell (this is the default option), or can be limited to only the four cardinal cells using the 'diag=FALSE' option, which prevents diagonal connections being evaluated when defining region membership. You will probably want to use use the same option here that was used with the regiongroup command.

This is an iterative command whereby the maximum allowed number of iterations is controlled by the limit option. If your raster is simple (relatively homogeneous) then only one or two iterations may be required. However, If portions of the raster are highly heterogeneous, and many small groups of pixels are mixed together, then more iterations will be required to arrive at a solution that no longer changes. As a general rule, 20 iterations is a reasonable starting point, but it is recommended that you inspect the raster to ensure the command has produced consistent results. Watch the number of groups to classify decrease in the progress bar as it processes. If it reaches 0 then it has reached an endpoint that cannot be further improved.

Syntax

generalizeregions(in, table, limit, out, [diag]);

inthe input raster region data source
tablethe input table data source resulting from the regiongroup command
limitthe minimum region size expressed as the minimum number of raster pixels
outthe output raster data source
[diag](TRUE/FALSE) allow cells to be diagonally connected when generalizing regions? (default=TRUE)

Example

generalizeregions(in="C:\data\lcovregions.img", table="C:\data\lcovregions.dbf", limit=10, out="C:\data\lcovgen");

generalizeregions(in="C:\data\lcovrg", table="C:\data\lcovrg.dbf", limit=20, out="C:\data\lcovgeneralized.tif", diag=FALSE);


Messages

Please consider making a purchase to support the continued development of these tools  Read more...

An apology for failing to respond to correspondence in recent months  Read more...

Tips on how to use this interface efficiently  Read more...

Sign up for the newsletter if you wish to receive notification of updates, new functionality, bug fixes, and other related news

Links

Open Source GIS

Copyright © 2001-2010 Hawthorne L. Beyer, Spatial Ecology LLC