Thu, Sep 20 2001
12:10:25
|
|
Request created by guest
|
|
Subject: r.in.gdal: number of imported rows incorrect?
grass downloaded at: CVS Server, Germany
grass sources source: yes, I am using the latest GRASS from CVS
Hi,
it seems that r.in.gdal uses an unusual row index
(src/raster/r.in.gdal/main.c):
for (row = 1; row <= nrows; row++)
{
Usually the row number starts with 0.
Any ideas?
Thanks
Markus
|
|
Thu, Sep 20 2001
14:51:17
|
|
Taken by fwarmerdam
|
|
Thu, Sep 20 2001
15:03:39
|
|
Status changed to resolved by fwarmerdam
|
|
Thu, Sep 20 2001
15:03:39
|
|
Comments added by fwarmerdam
|
|
Markus,
This isn't a bug. I test imported a raster of a known size and have
verified with r.info that it is the right size. The row value in
the code is just fine, if a bit unusual.
|
|
Fri, Nov 9 2001
15:33:14
|
|
Mail sent by glynn.clements@virgin.net
|
|
Return-Path |
<glynn.clements@virgin.net>
|
Delivered-To |
grass-bugs@mailman.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 |
<15339.58629.808525.43358@cerise.nosuchdomain.co.uk>
|
Date |
Fri, 9 Nov 2001 14:15:33 +0000
|
To |
Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it, Markus Neteler <neteler@itc.it>
|
Subject |
Re: [GRASS5] [bug #802] (grass) r.in.gdal: number of imported rows incorrect?
|
In-Reply-To |
<15273.63959.332371.810709@cerise.nosuchdomain.co.uk>
|
References |
<20010920101026.2C24913A0A@mailman.intevation.de> <15273.63959.332371.810709@cerise.nosuchdomain.co.uk>
|
X-Mailer |
VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid |
Glynn Clements wrote:
> > it seems that r.in.gdal uses an unusual row index
> > (src/raster/r.in.gdal/main.c):
> >
> > for (row = 1; row <= nrows; row++)
> > {
> >
> > Usually the row number starts with 0.
>
> This isn't limited to r.in.gdal; there is other code in GRASS which
> uses the Pascal convention for array indices (e.g. i.cca).
>
> In the case of the above file, this means that the call to G_percent()
> is wrong; the other references to "row" are as "row-1".
As Frank pointed out (a while back), this is actually correct; it
ensures that:
a) the reported percentages are correct (G_percent() is called at the
end of each pass), and
b) the final call to G_percent() reports 100% and prints a newline.
--
Glynn Clements <glynn.clements@virgin.net>
|
|
Fri, Nov 9 2001
15:33:15
|
|
Status changed to open by _rt_system
|
|
Fri, Nov 16 2001
17:13:27
|
|
Status changed to resolved by mneteler
|
|