Ok, I'll try that. It looks like some of the G-ring coordinates are
specified in such a way that it wraps around the globe the wrong way.. if
that makes any sense.. so if the Long straddles the -180/180 I get bogus
results.
On Sun, Oct 7, 2012 at 12:30 PM, Robert J. Hijmans wrote:
>
> Steve/Ma
Steve/Matteo,
Or like this using (s)apply:
m <- as.matrix(DF)
z <- apply(m, 1, function(x) Polygon(matrix(x[c(3:10, 3:4)], ncol=2,
byrow=T)))
n <- names(z)
y <- sapply(1:length(n), function(i) Polygons(z[i], n[i]))
sp <- SpatialPolygons(y, proj4string=CRS('+proj=longlat'))
spdf <- SpatialPolygons
Hi Steve, what about this?
DF <- structure(list(v = c(4L, 4L, 4L, 4L, 4L, 4L, 4L), h = 8:14, ll_lon =
c(-131.0149,
-117.7464, -104.5202, -91.3388, -78.2083, -65.15, -52.1199),
ll_lat = c(39.7081, 39.7342, 39.7557, 39.7728, 39.7858, 39.7937,
39.7994), ul_lon = c(-156.8405, -140.7952, -124.88