[GRASS-user] Creating spatially clumped random cells

Robert Nuske rnuske at gwdg.de
Fri Jan 10 00:57:12 PST 2014


Hi Johannes

another path might be to use the excellent tools of the R package spatstat to 
simulate various cluster processes. Those generated point patterns could then 
be translated to rasters.

Functions for random point processes exhibiting clustering in spatstat are 
e.g. rThomas, rGaussPoisson, rMatClust, rcell  (retrieved from the help page 
of rpoispp).

The simulated point density will of course not always have exactly the 
requested density.


cheers
  robert

 

Am Freitag, 10. Januar 2014, 08:17:50 schrieb Johannes Radinger:
> Hi Markus,
> 
> so far as I understood r.random.cell creates spatially most disaggregated
> cells (based on the distance parameter). So instead of clumping them this
> module does the opposite.
> 
> However, I am just trying another solution which might be promising: With
> r.random.surface
> it is possible to generate a spatially dependent surface (like a landscape
> with mountains and valleys). Then I can use r.quantile to get the
> lowest/highest e.g 20% of all values and consequently I can use r.mapcalc
> to reclassify all values smaller than the threshold value I yielded from
> r.quantile. First trials yielded good results although the 20% threshold
> did not exactly translate into 20% of all cells. I've to investigate a
> little bit more into that. Any other suggestions?
> 
> Best regards,
> Johannes
> 
> On Fri, Jan 10, 2014 at 12:43 AM, Markus Neteler <neteler at osgeo.org> wrote:
> > On Thu, Jan 9, 2014 at 4:09 PM, Johannes Radinger
> > 
> > <johannesradinger at gmail.com> wrote:
> > > Hi,
> > > 
> > > just two short question concerning the creation of random cells.
> > > So far I used r.random to create e.g. a map with 20% cells (of my input
> > > raster).
> > > I'd like to know:
> > > 1) Is there a way to create randomly spatially clumped rasters cells so
> > 
> > that
> > 
> > > the cells
> > > look aggregated like patches, while still setting the e.g. 20% limit?
> > 
> > Maybe
> > 
> > > with a factor of spatial autocorrelation!? Maybe somebody has an example
> > > 2) Is there a way to set a fixed seed to make reproducible results with
> > > r.random and similar modules?
> > 
> > While likely not a solution for you but take a look at
> > http://grass.osgeo.org/grass70/manuals/r.random.cells.html
> > 
> > Markus


More information about the grass-user mailing list