General BUG with d.vect and d.area

Carl Anderson candrsn at mindspring.com
Sun Nov 29 11:34:21 EST 1998


I have found a problem in GRASS 4.2.1
(I have GRASSS 4.2.1.v19 on a RedHat5.1/intel-i486/gcc 2.7.2.3 machine)

when g.region is set thus

GRASS-GRID > g.region -p
projection: 3 (Latitude-Longitude)
zone:       0
north:      89:59:44.99688N
south:      89:59:44.983022S
east:       179:59:44.949304E
west:       179:59:44.949304E
nsres:      0:00:29.999999
ewres:      0:00:30
rows:       21599
cols:       43200

d.vect will draw a map
but 
d.area will not draw a map

I got that "bad" region by accepting the 
default lat-long region in v.digit  while creating a new vector set.

d.area tests the bounding box of the region to each line in the
vector set.  The bad region  is bounded by (89.9958,-89.9958,359.9958,179.9958)
in d.area/cmd/main.c that is

        G_get_window(&window) ;
        if (D_check_map_window(&window))
                G_fatal_error("Setting map window");
        if (G_set_window(&window) == -1)
                G_fatal_error("Current graphics window not settable");
        if (D_get_screen_window(&t, &b, &l, &r))
                G_fatal_error("Getting screen window");
        if (D_do_conversions(&window, t, b, l, r))
                G_fatal_error("Error doing conversions");

Of course no lines would be (X > 359.9958) && (X < 179.9959)

d.vect/cmd/main.c does not generate such a window to test with.

IMHO
  d.vect and d.area need to produce similar results
  g.region needs to indicate an error (if indeed this region is an error)
  v.digit needs to not create such a thing (if it is doing so)

I have only looked at d.vect and d.area to make sure that both are working.
(they appear to be)

The error could be coming from v.digit, g.region as commands
or G_get_window() or D_do_conversions() as internal library commands

I hope someone has time to look into this so it can be fixed

----------------------------------
E-Mail: Carl Anderson <candrsn at mindspring.com>
Date: Mon, 29-Nov-98 12:00:00 +0000 (GMT)
Time: 11:08:33

This message was sent by XFMail
----------------------------------



More information about the grass-user mailing list