Here we go, I'm assuming each ring is its own simple object, and a few
other things.
id = rep(seq(1,3),each=12)
az = rep(seq(0,359,30),3)
## assume you meant to use all ids here?
d = data.frame(id,az)
d$dist = round(rnorm(36,10,3),1)
xp = function(azimuth, r){cos(((90-azimuth)*pi)/180)*r}
yp =
] Converting UTMs to SpatialPolygons object
Here we go, I'm assuming each ring is its own simple object, and a
few
other things.
id = rep(seq(1,3),each=12)
az = rep(seq(0,359,30),3)
## assume you meant to use all ids here?
d = dataframe(id [1],az)
d$dist = round(rnorm(36,10,3),1)
xp = function(azimuth, r
r-sig-geo listers:
Can anyone provide code or suggest commands for converting a data
frame with UTMS to a SpatialPolygons (sp package) object? Below, I
provide code to generate a sample dataframe, with three ordered
sequences of twelve coordinate pairs each.
id
It seems my data-generating code was cut off. Here's another try:
id = rep(seq(1,3),each=12)           # Generate polygon
IDs'
az = rep(seq(0,359,30),3)              # Generate
azimuth sequence
c = data.frame(id
[1],az)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
If you sent code it did not survive the journey. See the vignette in
sp for how to build polygons from scratch, section 7.1.
library(sp)
vignette(intro_sp)
On Mon, Jul 16, 2012 at 10:12 AM, s...@swbigelow.net wrote:
r-sig-geo listers:
Can anyone provide code or suggest