[GRASS-user] r.patch not working

Markus Neteler neteler at osgeo.org
Wed Apr 15 03:18:10 EDT 2009


Renae,

On Wed, Apr 15, 2009 at 7:16 AM, Renae Mackas <rmackas at sfu.ca> wrote:
>
> Hello GRASS users-
>
> I am trying to mosaic colourcomposites from LANDSAT images.  A few weeks ago, I had luck doing this using r.patch with the -z flag such as below:
>
> r.patch -z input=020.020.2000.055_rgb,021.020.2000.014_rgb,021.021.2000.142_rgb,022.020.2000.005_rgb output=mosaic
>
> When I try doing this now however, r.patch does not seem to be working.  In the output window, it shows a red cirle with an "X" in it next to the command, but does not print any error message below.  I have tried patching even just the original rasters (rather than the rgb composites), and continue to get the same results.
>
> Since the initial (successful) attempts with r.patch, I have extended the boundaries of the region I am working with and imported rasters from other locations.  All of the image rasters are currently within the region boundaries though.  Is there any reason why the changes I have made would have changed how r.patch functions?  Any suggestions of how to get it working again?

r.patch (like almost all rast commands) respect the current region.
You need to first set the  current region to all raster maps of interest,
then run r.patch:

g.region rast=020.020.2000.055_rgb,021.020.2000.014_rgb,021.021.2000.142_rgb,022.020.2000.005_rgb
-p

r.patch ...

Hope this helps
Markus


More information about the grass-user mailing list