[GRASSLIST:3139] Re: blending seams in patch

Richard Greenwood rich at greenwoodmap.com
Mon Apr 12 00:03:45 EDT 2004

Hamish wrote:
>>I have four rasters that I would like to patch. Unfortunately there
>>are 1 or 2 null cells along the common edges, which leave nulls in the
>>resulting patched map. I would like to simply average "across" the
>>nulls between adjoining rasters. I tried increasing the region
>>resolution by 8x, but I still have unsightly nulls. Any suggestions?
> try making a map with r.neighbors and then running r.patch with the
> merge map listed as the first input and the r.neighbors map as the
> second input (not sure if this is null safe? [does a 3x3 mean include
> the center cell in the calculation?]).
> If that doesn't work you might need to use an involved r.mapcalc
> command with the average of a series of neighborhood modifier references.
> Hamish

Perfect! Thank you. Simply running "r.neighbors in=patched_map 
out=fixed_up_map  method=average size=5" looks to have cleaned 
everything up quite nicely.

Best regards,
Richard Greenwood

More information about the grass-user mailing list