Details Ticket 992


Comment | Reply | Take | Open


Serial Number 992
Subject g.region Vask problem in lat/long
Area bug
Queue grass
Requestors neteler@itc.it
Owner none
Status resolved
Last User Contact Wed Mar 27 19:27:01 2002 (6 yr ago)
Current Priority 20
Final Priority 70
Due No date assigned
Last Action Sat Apr 13 10:32:55 2002 (6 yr ago)
Created Wed Mar 27 18:10:38 2002 (6 yr ago)

Transaction History Ticket 992


Wed, Mar 27 2002 18:10:38    Request created by guest  
Subject: g.region Vask problem in lat/long

Platform: GNU/Linux/i386
grass obtained from: CVS
grass binary for platform: Compiled from Sources

Working in lat/long location, I found a small (unusual) error:

GRASS:~ > g.region -p
projection: 3 (Latitude-Longitude)
zone:       0
datum:      WGS84
ellipsoid:  WGS84
north:      17:46S
south:      26:54:30S
west:       19:59E
east:       29:22E
nsres:      0:00:30
ewres:      0:00:30
rows:       1097
cols:       1126

Now starting g.region, selecting menu 1:
V_ask error: Length out of bounds in call to V_const           <- this warning
appears for 3 sec

                              IDENTIFY REGION
 
           ============================= DEFAULT REGION ========
           |          Default North:8:59:45S                   |
           |                                                   |
           |           =======  YOUR REGION  =======           |
           |           | NORTH EDGE:17:46S_____    |           |
           |           |                           |           |
 Def. West |WEST EDGE  |                           |EAST EDGE  | Def. East
 15:59:59.9919:59E_____|                           |29:22E_____|
           |           | SOUTH EDGE:26:54:30S__    |           |
           |           =============================           |
           |                                                   |
           |          Default South:29:00:15S                  |
           =====================================================
           PROJECTION: 3 (Latitude-Longitude)         ZONE: 0
 
                   Default   GRID RESOLUTION   Region
                     0:00:30--- East-West ---   0:00:30___
                     0:00:30-- North-South --   0:00:30___

The west value makes me unhappy. Looks like a rounding problem somewhere.

Markus
Wed, Mar 27 2002 18:17:15    Mail sent by guest  
Ah! Only now, after submitting, I found that the default region is
g.region -dp
projection: 3 (Latitude-Longitude)
zone:       0
datum:      WGS84
ellipsoid:  WGS84
north:      8:59:45S
south:      29:00:15S
west:       15:59:59.999982E
east:       34:00:29.999982E
nsres:      0:00:30
ewres:      0:00:30
rows:       2401
cols:       2161

I slighly change the report:
The field of default region in the g.region menu is too long and writing
into the current region. If there are no objections we should limit the
field length in
src/libes/gis/edit_cellhd.c

Markus
Wed, Mar 27 2002 19:27:01    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 <15522.3775.829754.297758@cerise.nosuchdomain.co.uk>
Date Wed, 27 Mar 2002 18:26:07 +0000
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #992] (grass) g.region Vask problem in lat/long
In-Reply-To <20020327171038.CEBFF139C9@lists.intevation.de>
References <20020327171038.CEBFF139C9@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=0 required=5 tests=
Request Tracker wrote:

> Subject: g.region Vask problem in lat/long
> 
> Platform: GNU/Linux/i386
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> 
> Working in lat/long location, I found a small (unusual) error:
> 
> GRASS:~ > g.region -p

Can you tell us the default region (rather than the current region),
as it seems to be the default West value that's causing the problem.

> Now starting g.region, selecting menu 1:
> V_ask error: Length out of bounds in call to V_const           <- this warning
appears for 3 sec

> The west value makes me unhappy. Looks like a rounding problem somewhere.

Well, floating point can't represent exactly fractions where the
denominator isn't a power of two, so rounding errors will occur.

G_lon_format() (which generates the string in question) doesn't use
any specific precision, so you get the standard behaviour of "%f",
which is 6 digits after the point.

But how many digits should it use? Are whole seconds sufficiently
accurate? Unless you require accuracy better than thousandths of a
second, the argument should be converted to seconds and integer
arithmetic used.

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


Sat, Apr 13 2002 10:32:55    Status changed to resolved by gclements  
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