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

Mathieu Rajerison mathieu.rajerison at gmail.com
Mon Oct 3 14:26:13 CEST 2016


Thanks Barry.

The doc says that drape uses a RasterLayer but not a RasterStack.

So I don't know to overlay my RGB 3-dim layer on top of the DEM.

Maybe I should convert the RGB to a unique value ?
How to convert a RGB value to a unique value and does plot3D accept it ?
ᐧ

2016-10-03 13:14 GMT+02:00 Barry Rowlingson <b.rowlingson at lancaster.ac.uk>:

> 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
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list