Details Ticket 859


Comment | Reply | Take | Open


Serial Number 859
Subject raster data at lower resolution: no resampling...
Area wish
Queue grass
Requestors neteler@itc.it
Owner none
Status resolved
Last User Contact Tue Nov 27 00:59:44 2001 (7 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu Feb 28 10:52:07 2002 (6 yr ago)
Created Mon Nov 26 23:50:11 2001 (7 yr ago)

Transaction History Ticket 859


Mon, Nov 26 2001 23:50:11    Request created by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Date Mon, 26 Nov 2001 23:50:07 +0100
From Markus Neteler <neteler@itc.it>
To grass-bugs@intevation.de
Subject raster data at lower resolution: no resampling...
Message-ID <20011126235007.A30734@itc.it>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.2.5i
Hi again,

(sorry to be so chatty)

from the GRASS prog's manual I understand that raster data
are resampled on the fly when looking at them in lower resolution.
I have tested this and found, that the maximum value is used
instead... that's wrong in my opinion.

An example

#use g.region to select a 6x6 subregion, say, at 30m resolution
g.region
#calculate a test map
r.mapcalc test="row() + col()"
#look at it:
d.mon x0
d.rast test; d.rast.num test
r.out.ascii in=test out=-

#switch to half resolution
g.region res=60
d.mon x1
d.rast test; d.rast.num test
r.out.ascii in=test out=-

# compare.

The last years I thought that the programmer's manual is right.
Obviously not (or not any more).

Looks like another bug,

Markus


Tue, Nov 27 2001 00:59:44    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15362.54959.691932.445565@cerise.nosuchdomain.co.uk>
Date Mon, 26 Nov 2001 23:56:31 +0000
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #859] (grass) raster data at lower resolution: no resampling...
In-Reply-To <20011126225011.AF3BF13A06@lists.intevation.de>
References <20011126225011.AF3BF13A06@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
Request Tracker wrote:

> (sorry to be so chatty)
> 
> from the GRASS prog's manual I understand that raster data
> are resampled on the fly when looking at them in lower resolution.

Yes. Note: "resampled" does not imply "interpolated"; you can't
meaningfully interpolate category values.

> I have tested this and found, that the maximum value is used
> instead...

Incorrect. When rescaling 2:1, the lower-right cell of each 2x2 block
will be used.

 that's wrong in my opinion.
> 
> An example
> 
> #use g.region to select a 6x6 subregion, say, at 30m resolution
> g.region
> #calculate a test map
> r.mapcalc test="row() + col()"

Try a different example:

  r.mapcalc test="14 - row() - col()"

This "flips" the output diagonally, so the values decrease from
top-left to bottom-right. This time, the resampled version gets the
minimum value.

> The last years I thought that the programmer's manual is right.
> Obviously not (or not any more).

To which part of the manual are you referring?

-- 
Glynn Clements <glynn.clements@virgin.net>


Tue, Nov 27 2001 01:44:48    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Resent-Message-Id <200111270044.fAR0ijH30932@thuille.itc.it.>
From Markus Neteler <neteler@itc.it>
To grass5@grass.itc.it
Subject Re: [GRASS5] [bug #859] (grass) raster data at lower resolution: no resampling...
Message-ID <20011127014157.B30909@itc.it>
Mail-Followup-To grass5@grass.itc.it
References <20011126225011.AF3BF13A06@lists.intevation.de> <15362.54959.691932.445565@cerise.nosuchdomain.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.2.5i
In-Reply-To <15362.54959.691932.445565@cerise.nosuchdomain.co.uk>; from glynn.clements@virgin.net on Mon, Nov 26, 2001 at 11:56:31PM +0000
Sender grass5-admin@grass.itc.it
Errors-To grass5-admin@grass.itc.it
X-BeenThere grass5@grass.itc.it
X-Mailman-Version 2.0.5
Precedence bulk
List-Help <mailto:grass5-request@grass.itc.it?subject=help>
List-Post <mailto:grass5@grass.itc.it>
List-Subscribe <http://grass.itc.it/mailman/listinfo/grass5>, <mailto:grass5-request@grass.itc.it?subject=subscribe>
List-Id GRASS 5 Developers mailing list <grass5.grass.itc.it>
List-Unsubscribe <http://grass.itc.it/mailman/listinfo/grass5>, <mailto:grass5-request@grass.itc.it?subject=unsubscribe>
List-Archive <http://grass.itc.it/pipermail/grass5/>
Date Tue, 27 Nov 2001 01:41:57 +0100
Resent-From neteler@itc.it
Resent-Date Tue, 27 Nov 2001 01:44:45 +0100
Resent-To grass-bugs@intevation.de
Thanks Helena and Glynn,

On Mon, Nov 26, 2001 at 11:56:31PM +0000, Glynn Clements wrote:
> 
> Request Tracker wrote:
> 
> > (sorry to be so chatty)
> > 
> > from the GRASS prog's manual I understand that raster data
> > are resampled on the fly when looking at them in lower resolution.
> 
> Yes. Note: "resampled" does not imply "interpolated"; you can't
> meaningfully interpolate category values.

yes, I agree in general. But.. 
 
> > I have tested this and found, that the maximum value is used
> > instead...
> 
> Incorrect. When rescaling 2:1, the lower-right cell of each 2x2 block
> will be used.
yes, that's what I also see.

> that's wrong in my opinion.
I agree - using the lower-right cell is as wrong as using any other
cell falling into the 2x2. That's why I expected an average on the fly.
O.K., I did not test for FP maps.

> > 
> > An example
> > 
> > #use g.region to select a 6x6 subregion, say, at 30m resolution
> > g.region
> > #calculate a test map
> > r.mapcalc test="row() + col()"
> 
> Try a different example:
> 
>   r.mapcalc test="14 - row() - col()"
> 
> This "flips" the output diagonally, so the values decrease from
> top-left to bottom-right. This time, the resampled version gets the
> minimum value.
Mhh, here I get the middle value (either upper right or lower left).

So, what's the right representation for this case?
 
> > The last years I thought that the programmer's manual is right.
> > Obviously not (or not any more).
> 
> To which part of the manual are you referring?
I found it on page 61 (the printed page number) of the current version.

"Users expect map layers to be resampled into the current region. This
implies that raster maps must be extended with no data for portions of the
region which do not cover the map layer, and that the raster map data be
resampled to the region resolution if the raster map resolution is
different. Users also expect new map layers to be created with exactly the
same boundaries and resolution as the current region.
"

Maybe I am on the wrong path, but I understand from above that both
FP and int maps are averaged at lower resolution. Some month ago
I did the same test with int maps, that time, if I recall correctly,
the values were averaged.

Best regards

 Markus
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5


Tue, Nov 27 2001 01:46:36    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Resent-Message-Id <200111270046.fAR0kW530942@thuille.itc.it.>
From Markus Neteler <neteler@itc.it>
To grass5@grass.itc.it
Subject Re: [GRASS5] [bug #859] (grass) raster data at lower resolution: no resampling...
Message-ID <20011127014427.C30909@itc.it>
Mail-Followup-To grass5@grass.itc.it
References <20011126225011.AF3BF13A06@lists.intevation.de> <15362.54959.691932.445565@cerise.nosuchdomain.co.uk> <3C02CE45.8CD03282@unity.ncsu.edu>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.2.5i
In-Reply-To <3C02CE45.8CD03282@unity.ncsu.edu>; from hmitaso@unity.ncsu.edu on Mon, Nov 26, 2001 at 05:20:37PM -0600
Sender grass5-admin@grass.itc.it
Errors-To grass5-admin@grass.itc.it
X-BeenThere grass5@grass.itc.it
X-Mailman-Version 2.0.5
Precedence bulk
List-Help <mailto:grass5-request@grass.itc.it?subject=help>
List-Post <mailto:grass5@grass.itc.it>
List-Subscribe <http://grass.itc.it/mailman/listinfo/grass5>, <mailto:grass5-request@grass.itc.it?subject=subscribe>
List-Id GRASS 5 Developers mailing list <grass5.grass.itc.it>
List-Unsubscribe <http://grass.itc.it/mailman/listinfo/grass5>, <mailto:grass5-request@grass.itc.it?subject=unsubscribe>
List-Archive <http://grass.itc.it/pipermail/grass5/>
Date Tue, 27 Nov 2001 01:44:27 +0100
Resent-From neteler@itc.it
Resent-Date Tue, 27 Nov 2001 01:46:32 +0100
Resent-To grass-bugs@intevation.de
On Mon, Nov 26, 2001 at 05:20:37PM -0600, Helena wrote:
> Glynn Clements wrote:
> 
> > Request Tracker wrote:
> >
> > > (sorry to be so chatty)
> > >
> > > from the GRASS prog's manual I understand that raster data
> > > are resampled on the fly when looking at them in lower resolution.
> >
> > Yes. Note: "resampled" does not imply "interpolated"; you can't
> > meaningfully interpolate category values.
> >
> 
> I have just send an email to Markus explaining just that. It was too long
> for the list. If raster represents a continuous field, one has to
> reinterpolate, if it is an area or line map with categories (what GRASS
> originally was designed for) the resampling was acceptable.

... maybe I am too tired right now, but how shall GRASS detect if
the raster represents a continuous field (in INT) or a categories map?
Currently GRASS seems to silently do something.

Please be patient :-)

Markus
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5


Thu, Dec 20 2001 03:06:47    Area changed to wish by gclements  
Thu, Feb 28 2002 10:52:07    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request