Skip to content
Prev 19499 / 29559 Next

random sampling along contour

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Seth, after running your script, I tried:

b = gBuffer(t.sl, width = .1, byid=FALSE)
plot(b, col='#ff000088', add=TRUE)
i = gIntersection(b, v.sldf, byid = TRUE)
plot(i, col = 'blue', add=TRUE)
pts = spsample(i[1], n=1, type='random')
l = lapply(1:length(i), function(x) spsample(i[x], n=1, type='random'))
npts = do.call(rbind, l[!sapply(l, is.null)])
plot(npts, add=TRUE, col = 'green')

which goes a fixed distance from the transect, but not a fixed
distance along each contour. Note that you get one point per unique
contour level.
On 10/09/2013 03:01 PM, Seth Bigelow wrote:
- -- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of M?nster
Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251
83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAD3A77F1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSVWfqAAoJEM1OCHCtOnfxDnsIAIapaJ3hiSN5D1Y7e4uUEYeH
rg8vvTCCzQjQxc1472wyUZYfK552kUugA+C0IYP97HWAEzMQkkPVI1EFCm2f3Cpo
6OBkSMvfaU+TM/Q7WMnDJqry0AKXXc576fgpAnYXktavgzzuEDbaFg5yAg717ZYz
SBrThQ8b0148DtWEHGsXQbBJvfxQY6ymhlPWBNQD2hKsqN+A/j27RADCdehmDnNk
ZkMUGN2ehxKrX9MrkdNU0JFLr41diKzNeqsULzr4YH2yyzTiQqKsPdF7PvmuEdqK
2tGNpOi2SWimLWcXpdXQ2NqGVhKkPzC5Pj0K4fXBs4n4QES2Q6cc2XgKJOeCaKU=
=qGv9
-----END PGP SIGNATURE-----