Hi list,

I'd like to plot3D() a raster layer using it's own coordinates instead of
the row-col system so I can easily add points.
Here's a demo

library(raster)
library(rgl)

r <- raster(matrix(1, nrow = 5, ncol = 5))
extent(r)
# class       : Extent
# xmin        : 0
# xmax        : 1
# ymin        : 0
# ymax        : 1
plot(r)
points(0.5, 0.5) # centre of the raster


plot3D(r)
decorate3d()
rgl.points(0.5, 0.5, 1.5, col = 2) # wrong
rgl.points(3.5, 3.5, 1.5, col = 1) # it's row-col coordinates

Thanks,
Etienne

	[[alternative HTML version deleted]]

