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.
thks
F
Are there any ideas how to run this process in batch mode for example?
On Thu., Apr. 25, 2019, 21:40 Francois Chartier, <fra.chartier@gmail.com> 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.
thks
F
Maybe https://grass.osgeo.org/grass77/manuals/t.rast.to.rast3.html can be useful here?
···
From: grass-user grass-user-bounces@lists.osgeo.org on behalf of Francois Chartier fra.chartier@gmail.com
Sent: Wednesday, May 1, 2019 2:00:12 PM
To: GRASS user list
Subject: Re: [GRASS-user] Combining 2d rasters to 3d using point files
Are there any ideas how to run this process in batch mode for example?
On Thu., Apr. 25, 2019, 21:40 Francois Chartier, <fra.chartier@gmail.com> 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.
thks
F
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
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@club.worldonline.be> wrote:
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