[GRASS5] [bug #4045] (grass) r.random not so random

this bug's URL: http://intevation.de/rt/webrt?serial_num=4045
-------------------------------------------------------------------------

Subject: r.random not so random

Platform: WindowsNT/2000/XP
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 6.0.0

I recently downloaded and installed the cygwin version of GRASS GIS. My primary objective is to generate hillshades. To do so I have been importing shapefiles with contour data and running v.surf.rst. The results have been OK but very segmented. Following the suggestion by Neteler and Mitasova in "Open Source GIS: A GRASS Approach", I attempted to generate random points to merge with the contour points and re-run v.surf.rst. Unfortunately, r.random seems to be generating points clustered at the top of the region. I have been unable to find a way around this in GRASS and have noticed only one or two mentions of the problem in the mailing list archives, but no suggested work-around.

Request: The randomness of r.random requires improvement/correction.

Cheers,

Paul A. Light

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=4045
-------------------------------------------------------------------------

Subject: r.random not so random

Platform: WindowsNT/2000/XP
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 6.0.0

That bug has since been fixed.

I'm not sure whether the fix made it into 6.0.1, as there doesn't
appear to be a CVS tag for the 6.0.1 release.

--
Glynn Clements <glynn@gclements.plus.com>

this bug's URL: http://intevation.de/rt/webrt?serial_num=4045
---------------------------------------------------------------------

Subject: r.random not so random

Platform: WindowsNT/2000/XP
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 6.0.0

I recently downloaded and installed the cygwin version of GRASS GIS.
My primary objective is to generate hillshades. To do so I have been
importing shapefiles with contour data and running v.surf.rst. The
results have been OK but very segmented. Following the suggestion by
Neteler and Mitasova in "Open Source GIS: A GRASS Approach", I
attempted to generate random points to merge with the contour points
and re-run v.surf.rst. Unfortunately, r.random seems to be generating
points clustered at the top of the region. I have been unable to find
a way around this in GRASS and have noticed only one or two mentions
of the problem in the mailing list archives, but no suggested
work-around.

Request: The randomness of r.random requires improvement/correction.

Can you try GRASS 6.1? I think it is fixed.

here we go:

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/raster/r.random/creat_rand.c

Revision 2.1 / (as text) / (view) - annotate - [select for diffs] , Tue Jul 5 05:50:31 2005 UTC (6 months, 3 weeks ago) by hamish
Branch: MAIN
Changes since 2.0: +1 -1 lines
Diff to previous 2.0

fix lrand48() for Cygwin & Apple. (fix from Glynn) see:
  http://grass.itc.it/pipermail/grass5/2005-June/018519.html
  http://grass.itc.it/pipermail/grass5/2005-June/018528.html

.. but apparently not backported to 6.0.x.
  (can someone please do if it works?, thanks.)

Hamish

On Sat, Jan 28, 2006 at 02:25:16PM +1300, Hamish wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=4045
> ---------------------------------------------------------------------
>
> Subject: r.random not so random
>
> Platform: WindowsNT/2000/XP

...

fix lrand48() for Cygwin & Apple. (fix from Glynn) see:
  http://grass.itc.it/pipermail/grass5/2005-June/018519.html
  http://grass.itc.it/pipermail/grass5/2005-June/018528.html

.. but apparently not backported to 6.0.x.
  (can someone please do if it works?, thanks.)

I have sync'ed r.random in 6.0-CVS to the 6.1 version.
The fix will appear in 6.0.2.

Markus