[GRASS-user] Joining Two Adjacent Raster DEMs

   Two source DEMs each cover half the project analytical area. I want to
join the two into a single raster DEM. Tried using 'r.mapcalc dem_proj =
dem2 + dem3' but that did not produce anything visible. From reading
mapcalc.pdf and mapcalc-algebra.pdf I know the module is designed for
combining multiple raster maps cell-by-cell. I've not found how to
edge-match and join two rasters that do not have overlapping coverage.

   Please pass me a pointer to the appropriate module to use for this
operation.

TIA,

Rich

On Fri, 16 Mar 2012, Rich Shepard wrote:

Please pass me a pointer to the appropriate module to use for this
operation.

   Duh! r.patch does the job.

Rich

Two source DEMs each cover half the project analytical area. I want to
join the two into a single raster DEM. Tried using ‘r.mapcalc dem_proj =
dem2 + dem3’ but that did not produce anything visible. From reading

I think that the '+'operator honors NULL cells, so anywhere that is NULL in either raster will be null in the result. That’s not what you want in this case.

mapcalc.pdf and mapcalc-algebra.pdf I know the module is designed for
combining multiple raster maps cell-by-cell. I’ve not found how to
edge-match and join two rasters that do not have overlapping coverage.

Please pass me a pointer to the appropriate module to use for this
operation.

r.patch does this.
As per the man page, be sure to set the region to all input rasters in advance:
g.region rast=dem2,dem3

···
-- 
Micha Silver
GIS Consultant, Arava Development Co.
[http://www.surfaces.co.il](http://www.surfaces.co.il)

Please pass me a pointer to the appropriate module to use for this
operation.

  Duh! r.patch does the job.

another way maybe:

- build a gdal virtual dataset:

   GDAL Virtual Format:
http://www.gdal.org/gdal_vrttut.html

   gdalbuildvrt:
http://www.gdal.org/gdalbuildvrt.html

- link to gdal virtual dataset with r.external:
http://grass.osgeo.org/grass64/manuals/html64_user/r.external.html

?

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Joining-Two-Adjacent-Raster-DEMs-tp4626778p4628174.html
Sent from the Grass - Users mailing list archive at Nabble.com.