[GRASS-user] r.thin and double precision values

Johannes Radinger JRadinger at gmx.at
Mon Feb 6 10:47:38 EST 2012


I experienced that r.thin handles only integer values (GRASS 6.5 SVN). Is that simply a methodological issue which needs to be in that way? Or will there be changes in future releases where r.thin also uses floats (double precision)?
In my case I use v.to.rast to populate a raster with comma values (from an attribute column, range 0-1.81). Using r.thin afterwards I get only 0, 1 and 2 values which I don't want.
There are now two ways I thought of to bypass this problem:

1) first use mapcalc to multiply the raster by 1000 resp. adding 1000 (or anything else), then perform r.thin and then back calculate the old value using r.mapcalc.

2) first use r.thin and then populate the raster with the old value from the original raster with r.mapcalc

Any suggestions?

Additionally I'd like to know if there is any GRASS tool where I can get new raster values from a vector. Like: Assign a new value to the raster cell from the overlaying line attribute. What I am doing so far is using v.to.rast but I have to get raster for lots of vector attribute columns...

Best regards

NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://www.gmx.net/de/go/freephone/

More information about the grass-user mailing list