[GRASS5] [bug #992] (grass) g.region Vask problem in lat/long

Markus Neteler neteler at itc.it
Wed Mar 27 16:50:46 EST 2002


On Wed, Mar 27, 2002 at 06:26:07PM +0000, Glynn Clements wrote:
> 
> 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.

Yes, please have a look in the RT - I had submitted a followup (and
obviously forgot to cc to the list). In fact 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.

Mhhh, but I was demanding rounded coordinates with
g.region res=0:00:30 -a
earlier. The DEFAULT_WIND contains a round West, only inside g.region
it appears strange (means: should be everywhere the same value).

> 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.

Eventually yes. At least the overwriting (see RT followup) isn't nice.

Markus



More information about the grass-dev mailing list