28 Jun 2012 12:32
SpatialPoints, SpatialGrid and related terminology
Gabriele Cozzi <gab.cozzi <at> gmail.com>
2012-06-28 10:32:00 GMT
2012-06-28 10:32:00 GMT
Dear list,
apologize for the unusual question. I am new and I have some problems with
some of the terminology.
I had my codes running but only after trial and error rather than with a
full understanding of what is what and this does not entirely satisfy me.
I have a data frame (call it grid1) containing X, Y coordinates along with
other variables
Locations are spaced 500 m apart on on a grid. Here an example with random
data:
##-------------
X1 <- rep(seq(0,20000, by=500)
, each=45)
Y1 <- rep(seq(0,20000, by=500)
, 45)
grid1 <- data.frame(X1,Y1,
value=rep("val", length(X1)))
plot(grid1$X1,grid1$Y1, cex=0.1)
##--------------
I want to extract from grid 1 only those locations, and relative values,
that are spaced 2500 m apart, so basically those locations that overlap
with a second data frame (call it grid2). In other words those locations
where dots overlap with circles (cfr. the plot in the codes below)
##--------------
X2 <- rep(seq(0,20000, by=2500)
, each=9)
Y2 <- rep(seq(0,20000, by=2500)
(Continue reading)
RSS Feed