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

Michael Treglia mtreglia at gmail.com
Fri Jul 5 14:52:46 PDT 2013


You might have already thought of these techniques, but here are two
options that quickly come to mind...

You should be be able to mask each watershed individually (from a vector
layer), and then run r.reclass on the area within each watershed boundary.

Alternatively, if you have a vector layer for watershed boundaries, what
about creating a numeric attribute in which you assign each unique
watershed a different number. Then, rasterize the watershed layer.

If you have a lot of watersheds, it seems like the second option would be
easier... and there obviously might be a more elegant solution that I'm not
aware of.

Hope that helps!
Mike


On Fri, Jul 5, 2013 at 2: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/20130705/2a96f9ef/attachment.html>


More information about the grass-user mailing list