[R-sig-Geo] DEM plot3D and overlay an aerial image

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Oct 3 13:14:28 CEST 2016


On Mon, Oct 3, 2016 at 10:38 AM, Mathieu Rajerison
<mathieu.rajerison at gmail.com> wrote:
> Hi R-List,
>
>
> I have a DEM on one hand, and on the other hand, I have an RGB aerial image
>
> I tried rasterVis and plot3D function, but I didn't find how to use the
> colors of my RGB aerial image.

from the help for plot3D:

  drape: RasterLayer, to 'drape' colors representing the values of
          this layer on the 3D representation of layer ‘x’. In this
          case‘x’ typically has elevation data

So plot(x=mydem, drape=myimage) will make a 3d plot with the heights
from `mydem` and the colours from `myimage` draped over it - if
`myimage` is a 3-layer RGB raster then I suspect you'll get what you
want...

Barry



More information about the R-sig-Geo mailing list