image2Grid {trip} | R Documentation |
A simple function to convert an image (xyz list) into a SpatialPointsDataFrame.
image2Grid(x, p4 = NA)
x |
an list with components "x" and "y" (cor and "z" like that used by image
and contour |
p4 |
a PROJ.4 string specifying the coordinate system used |
The coordinate vectors "x" and "y" may have the same length as the dimensions of matrix "z"
A SpatialGridDataFrame
with one column, "z".
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
# taken from image example x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) im <- list(x = x, y = y, z = volcano) g <- image2Grid(im) image(im, col = terrain.colors(100), axes = FALSE) contour(g, add = TRUE) ## just in case there is any doubt image(g, xlim = c(100, 140), ylim = c(100, 140)) abline(h = im$y+5, v = im$x+5)