[GRASS-user] Re: count pixels by attribute in sampling units

Hamish hamish_b at yahoo.com
Wed Dec 26 19:12:14 EST 2007


Patrick Giraudoux wrote:
> > Doubts confirmed... Circles in r.le.setup may not reach the
> > expected size.
...
> Complement: any radius > 100 gives inconsistent results in the
> 'units' file of r.le.par:
> 
> /Thèse Fritsch/PrépaFragStat/grass$ cat r.le.para/units
>          1    # of scales
>          5    # of units of scale 1.
> -1078225628-1217465035   u_w, u_l of units in scale 1
>      100.5             radius of circles in scale 1
>  539113457 608735128   left, top of unit[1]
>  539113466 608734109   left, top of unit[2]
>  539114864 608734976   left, top of unit[3]
>  539115149 608733823   left, top of unit[4]
>  539113914 608733783   left, top of unit[5]
> 
> When I use a shorter radius, I get:
> 
> grass > cat r.le.para/units
>          1    # of scales
>          5    # of units of scale 1.
>         51        51   u_w, u_l of units in scale 1
>       25.5             radius of circles in scale 1
>        618      2586   left, top of unit[1]
>        627      1567   left, top of unit[2]
>       2025      2434   left, top of unit[3]
>       2310      1281   left, top of unit[4]
>       1075      1241   left, top of unit[5]


Hi,

bug found and fixed in 6.3 svn. The logic around the >100 check was to
blame. Thanks for pin-pointing it.

http://trac.osgeo.org/grass/log/grass/trunk/raster/r.le/r.le.setup/sample.c

I haven't tested the fix, but it should work. If it works for you can
you post to this list with the result? It should then be safe to
backport to the release branches. I am traveling right now so would ask
someone else to commit that- I left my knoppix/ubuntu CDs at home and
after a spyware infection scare yesterday (apparently stopped by the
outgoing firewall) on a very well maintained WinXP PC, I am a rather
concerned about ssh'ing into our server (& then to osgeo SVN) from any
MS Windows machine ever ever ever again.


Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-user mailing list