[R-sig-Geo] Randomly moving a locality (within set limits)

Alastair Potts potts.a at gmail.com
Fri Aug 22 13:12:36 CEST 2014


Hi all,

I was wondering if someone could help point me in the right direction here
- I can't seem to find a function or post that focuses on this.

I have localities around the world. I want to be able to randomly move a
given locality within a set radius (defined by km). So, I have a point at
xy and want it to be shifted to some other locality within, say, 15 km of
of its current locality.

This is simple enough using something like runif(1,-15,15), but it's the
lat-long conversion that is confusing me (how to work out how many decimal
degrees this might be around the point at different global localities).

Any help or pointers would be greatly appreciated.

Thanks in advance,

Cheers,
Alastair

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list