GME

Geospatial Modelling Environment

regiongroup (Raster Region Group)

A raster tool that identifies contiguous blocks of cells of the same value (i.e. regions) and assigns each region a unique ID number that is written to the output raster dataset

Description

This is a raster tool that identifies contiguous blocks of cells of the same value (i.e. regions) and assigns each region a unique ID number that is written to the output raster dataset. It is designed for use only with thematic (categorical) rasters.

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.

The unique ID numbers in the output raster are arbitrary, but are ordered by when the region is first encountered when moving left to right and top to bottom through the raster dataset. The output also includes a DBASE (dbf) table that summarises the number of cells that belong to each region.

For large raster datasets this tool can take quite some time to run (a few hours for very large rasters). It is therefore recommended that you test the tool on a small raster dataset before applying it to the full dataset.

Syntax

regiongroup(in, out, [diag]);

inthe input integer raster data source
outthe output integer raster data source
[diag](TRUE/FALSE) allow cells to be diagonally connected when defining regions? (default=TRUE)

Example

regiongroup(in="C:\data\landcov", out="C:\data\lcovrg");

regiongroup(in="C:\data\landcov", out="C:\data\lcovrg", diag=FALSE);


Messages

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

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

Links

Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn