Hi Andrew,

You should give us a few more details  on the kind of application you need
these maps for, as well as on which sort of random process you are thinking
of.

You yourself mentioned that randomly dividing a polygon is enough for your,
not needing a random generation of the outlines of the map. Then, just
follow Rolf's advise, with something like:

randompoints <- rpoint(500) #here it goes the number of features you want
to dive the map into
final.map <- dirichlet(randompoints)
plot(final.map)

Notice that the final outline of this "map" is a square. If you want it to
be a circle and you are fine with an uniform random distribution, you can
just use the function runifdisc instead of rpoint. Or you can use any
previously read/created polygon with the parameter "win" in the rpoint
function.

Now, if you also want a random outline for the map, one possibly easy
solution that comes to my mind is to first generate a few random points,
connect them to form polygons, merge polygons into one final single polygon
to be used as the outline. Than, you just indicate this in the "win"
parameter of the rpoint function in the example above.

Hope it helps to get started.

Best,

Fabricio




2014-05-13 18:31 GMT-04:00 Rolf Turner <r.turner@auckland.ac.nz>:

> On 14/05/14 10:04, Andrew Bernj wrote:
>
>> Dear list,
>>
>> I write you to ask if anyone knows of any package, function, or code
>> to generate random polygon maps? Of course, a simpler and also good
>> enough solution for me would be any way to divide/split a single
>> polygon randomly into other polygons.
>>
>> I am willing to code it myself either in R or Python if necessary, but
>> I fell that similar things probably have been tried so far and would
>> not like to overlap on those.
>>
>
> How random?  Random in what way?  You can always generate a random point
> pattern and then form the Dirichlet/Voronoi tessellation of that pattern.
>  Is that random enough for you?  If so, the facilities are provided in the
> "spatstat" package (and in a more limited way in the "deldir" package that
> gets used by spatstat for the guts of the tessellation calculation).  Note
> that the polygons generated are all convex.
>
> cheers,
>
> Rolf Turner
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

