[GRASS-user] r.to.vect problem
Tyler Smith
tyler.smith at mail.mcgill.ca
Fri Feb 9 01:44:08 EST 2007
On Fri, Feb 09, 2007 at 02:47:25PM +1300, Hamish wrote:
> you can also use r.mapcalc to make a MASK map if you don't want to
> modify your raster map.
>
> r.mapcalc "MASK = if(oldmap > 5)"
>
> "g.remove MASK" when done.
>
> or,
>
> r.mapcalc "newmap = if(oldmap > 5, oldmap, null() )"
> # if( this, then use this, otherwise use this )
>
Thanks! I stumbled onto r.mapcalc myself, and realized that I wouldn't
need to convert to vectors after all. Which is good, because r.to.vect
takes a long time on my laptop. I used r.mapcalc to produce new
'binary' maps with all values 5 and up switched to 1, everything else
switched to 0, then used r.coin to go through and calculate all the
overlaps. There is probably a better way to transfer the data into R,
but for a single 8x8 matrix this wasn't too bad.
Now I have to figure out what exactly I'm going to do with my
data... Maybe it's just because my previous experience learning R and
Emacs has toughened me up a bit, but I'm finding GRASS is a lot of
fun!
Thanks for your suggestions, it really helps when you're working in
isolation.
--
Regards,
Tyler Smith
More information about the grass-user
mailing list