rgeo
and rgeo2
differ in the algorithms used to generate random positions.
Each assumes a spherical globe. rgeo
uses that fact that each of the x, y and z
coordinates is uniformly distributed (but not independent of each other). Furthermore, the
angle about the z-axis is uniformly distributed and independent of z. This provides
a straightforward way to generate Euclidean coordinates using runif
. These are then
translated into latitude and longitude.
rlatlon
is an alias for rgeo
and
rlonlat
is too, expect that it reverses the
order in which the latitude and longitude values are
returned.
rgeo2
samples points in a cube by independently sampling each coordinate. It then
discards any point outside the sphere contained in the cube and projects the non-discarded points
to the sphere. This method must oversample to allow for the discarded points.