[GRASS-user] reclass raster with all unique values?

Paulo van Breugel p.vanbreugel at gmail.com
Fri Jul 5 15:13:00 PDT 2013


You could convert the raster layer to a vector layer. In the attribute
table you'll have a column with the raster value (the watershed values) and
the cat column, which gives you the unique identifier for each polygon.
Next you just convert the vector back to raster using the cat column as
raster value.

But depending on your data, you might also want to check out r.clump or
r.clump2 (I think the latter is a add-on).

Paulo


On Fri, Jul 5, 2013 at 11:03 PM, Stephen Sefick <sas0025 at auburn.edu> wrote:

> I have a raster map with watersheds that are the same value.  Is there an
> easy way to reclass the map with every distinc basin to have a unique value?
>
> many thanks,
>
>
> --
> Stephen Sefick
> ****************************************************
> Auburn University
> Biological Sciences
> 331 Funchess Hall
> Auburn, Alabama
> 36849
> ****************************************************
> sas0025 at auburn.edu
> http://www.auburn.edu/~sas0025
> ****************************************************
>
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods.  We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
>                                 -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>                               -Robert Gentleman
>
> ______________________________**_________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/grass-user<http://lists.osgeo.org/mailman/listinfo/grass-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130706/bca2d295/attachment.html>


More information about the grass-user mailing list