[GRASSLIST:8570] Re: Changing scale of raster map

Bruno GUILLAUME guib at aero.obs-mip.fr
Mon Oct 10 11:20:48 EDT 2005


Ian,

thanks for your prompt reply. Let us talk about my raster, say "toto" 
(unit=kg).
Well, in fact, my initial resolution for toto is 00:00:30 but it is full 
world map (=933120000 grid cells in total!), so it is not easily 
portable in flat ASCII format!! So, I prefer to convert it first to a 
resolution of 1°x1° (this resolution is largely enough for my goals).
The problem is that after using the g.region command to convert it, I 
check out the conservation of mass and my problem is that I do not get 
the same total amount of kg (unit of toto) with r.sum rast=toto under 
00:00:30 resolution and under 1° resolution !
So, I suppose that g.region do not accumulate the field of values 
represented in toto (unit=kg) but rather interpolate it.
So what does it do exactly ? And how can I get it to change resolution 
with mass-conservation of the field in toto, so that the value in one 
big grid cell of toto in 1°x1° resolution be equal to the sum of all 
little grid cell values (of resolution 00:00:30) comprised in the big 
cell  ?

Hope this problem is clearer expressed,

Bruno.

Ian MacMillan wrote:
> Bruno, first thing, in a latlong projection, the units of resolution 
> are given in degrees.  So ewres=1 means that your cell width is one 
> degree.  Most other projections have a cell unit of meters.  For 
> example an ewres=1 in an UTM projection would mean that your cell 
> width is one meter.  To change your resolution, you can use
>
> g.region res=your_res
>
> for example
>
> g.region res=00:00:30 yields a 30 arc second resolution in a latlong 
> projection.
>
> Hope this helps,
> Ian
>
>
> On Oct 10, 2005, at 7:35 AM, Bruno GUILLAUME wrote:
>
>> Dear GRASS users,
>>
>> My problem concerns a raster in lat-lon projection, having a given 
>> resolution of ewres1,nsres1. For every cell, the category value is 
>> expressed in kilogram.
>> I need to transform it into  the same grid but with coarser 
>> resolution, say ewres2=10*ewres1 and nsres2=10*nsres1, BUT the 
>> transformation need to be mass-conservative (so, I need to get 
>> exactly the same amount in kilograms with finer and coarser resolution).
>>
>> Can I do in a simple way with GRASS ?
>>
>> Thanks in advance,
>>
>> Bruno Guillaume.
>>
>>
> >
> >
> What happens if a big asteroid hits Earth? Judging from realistic 
> simulations involving a sledge hammer and a common laboratory frog, we 
> can assume it will be pretty bad.
>  - Dave Barry
>
>
> -------------------------------------------------------------
> This message has been scanned by Postini anti-virus software.
>
>




More information about the grass-user mailing list