[R-sig-Geo] [FORGED] Spatial points pattern generation
Rolf Turner
r.turner at auckland.ac.nz
Wed Dec 14 01:18:28 CET 2016
On 14/12/16 12:17, Maurizio Marchi wrote:
> Hello everybody, working with the spatstat package I would need to generate
> some artificial spatial points pattern with an associate mark. More in
> detail I would like to create 3 or 4 examples with approximately 1000 trees
> on a square of 100x100 metres (1 hectare) with
>
> 1) Completely random distribution
> 2) Clustered distribution
> 3) Regular distribution
> 4) Mixed distribution
>
> all the points must have an associated mark (e.g. in case of trees a
> diameter in centimeters) and the autocorrelation must be detectable (the
> exercise is exactly aimed to study the presence of autocorrelation)
"Completely random" patterns can be generated using rpoispp().
Clustered patterns can be generated using (amongst other functions)
* rThomos()
* rMatern()
* rLGCP()
or more generally using rNeymanScott().
Regular patterns can be generated using rmh() with 'cif="strauss"'
or using rStrauss().
Not quite sure what you mean by a "Mixed distribution". Perhaps you
want to do something like generate patterns from 1), 2) and 3) and then
superimpose them into a single pattern using superimpose().
Marks are assigned to points of a pattern by means of the syntax
marks(X) <- m
where m is a vector or factor of length equal to npoints(X) or a data
frame with nrows(m) = npoints(X).
How you generate the marks is up to you.
Read the (incredibly well written :-) ) help for the functions referred
to above, or better still read the (even more incredibly well
written :-) ) book to which you can find a pointer by pointing your
browser at http://spatstat.github.io.
That's about all I can say in response to such a general question. If
you have further focussed and specific questions, please get back to me.
cheers,
Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
More information about the R-sig-Geo
mailing list