[GRASS-user] Combining 2d rasters to 3d using point files

Francois Chartier fra.chartier at gmail.com
Fri May 3 06:45:44 PDT 2019

I am doing it manually for now, picking the files one by one, but i have
come up with a way to make a string of text in excel for each raster
elevation and combining into one and then pasting into grass module.  i
will send results this wkd, and i will try your recom.

On Fri., May 3, 2019, 08:54 Moritz Lennert, <mlennert at club.worldonline.be>

> On 26/04/19 03:40, Francois Chartier wrote:
> > Hi
> >
> > I would like to combine potentially 100s of 2d rasters into one 3d
> raster.
> >
> > Instead of using r.to.rast3 which could take a long time to prepare the
> > setting, is there a way to export the raster as point files, and combine
> > them using for example MsAccess, and then reimporting them into one 3d
> > raster file?
> >
> > Alternatively, is it possible to combine several 3d raster into one 3d
> > raster?  i could combine ten 2d rasters into one and then combine the
> > multiple 3d rasters into one larger one.
> If Stefan's suggestion does not help, and if each 2D raster is of one
> constant height, you could try a combination of r.out.xyz and r3.in.xyz
> with some magic in between to include a z. Here's an uncomplete and
> untested algorithm for Linux in
> height = 0
> for each raster:
>         height = height + step
>         r.out.xyz raster out=- | awk -v var=$height -F'|' '{print
> $1,$2,var,$3}' >> combined_raster
> then
> r3.in;xyz combined_raster
> Moritz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190503/b7c845e8/attachment.html>

More information about the grass-user mailing list