[GRASSLIST:582] Re: Change of spatial support

Thomas Adams Thomas.Adams at noaa.gov
Wed Apr 5 10:56:31 EDT 2006


Ulrich,

I was wondering if r.proj, selecting bilinear interpolation might work 
for you? I understand that all other projection parameters would be the 
same, except for the grid spacing (1000m vs 250m).

Tom


Ulrich Leopold wrote:
> On Wed, April 5, 2006 13:03, Hamish wrote:
>   
>>> I am trying to change the spatial support (grid size) of some floating
>>> point raster maps from 250x250m to 1000x1000m. It's a kind of
>>> upscaling or more preciseley aggregation.
>>>
>>> All I need to do is to superimpose the larger grid on the smaller grid
>>> and compute the average and variance for the larger grid from the 4x4
>>> 250m cells located within one 1000m cell.
>>>
>>> I recognise that this is still not possible in GRASS. The GRASS
>>> resampling methods for change of resolution, such as r.neigbors or
>>> g.region are not an option as they do not provide a simple averaging
>>> method and the aggregation error (variance).
>>>       
>> r.resample, r.resamp.rst
>>
>> ?
>> Hamish
>>
>>
>>     
> No r.resample uses the same method also nearest the neighbor method and does
> not provide any calculation of summary statsitics within a larger grid cells.
>
>
> r.resamp.rst does a re-interpolation of the raster cells. I am  looking for an
> aggregation of floating point raster cells for a lower grid resolution (4x4 =>
> 1x1). Simply take the average of a 4 x 4 raster cells and produce a single
> mean value for a larger grid cell (but for floating point numbers not
> integers).
>
> Take 4 x 4 raster cells
>
> 2.5  3.5  1.5  0.5
> 2.5  3.5  1.5  0.5
> 2.5  3.5  1.5  0.5
> 2.5  3.5  1.5  0.5
>
> compute the mean and variance to yield one raster cell with
>
> mean = 2.0
> var  = 1.333
>
> jump to next block of 4 x 4 raster cells which have not been used in previous
> calculation and repeat the calculation and so on.
>
>
> Any ideas for r.mapcalc?
>
>   


-- 
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL:	thomas.adams at noaa.gov

VOICE:	937-383-0528
FAX:	937-383-0033




More information about the grass-user mailing list