this bug's URL: http://intevation.de/rt/webrt?serial_num=978
-------------------------------------------------------------------------
Subject: Raster maps in GRASS monitor show unwanted color stripe on left side
Platform: Linux/Intel
grass downloaded at: CVS Server, Germany
grass binary for platform: I compiled the sources myself
grass sources source: (latest) GRASS from CVS
Hi,
what I discover some time ago and looks like a small map shift (or whatever):
Raster maps in GRASS monitor sometimes show unwanted color stripe on left side.
For illustration I have generated a snapshot:
http://mpa.itc.it/markus/tmp/grassmon_stripe.jpg
(Lat/Long).
This appears also in projected locations but not always (I do not know a way yet
to reproduce it with Spearfish)
Markus
-------------------------------------------- Managed by Request Tracker
Request Tracker wrote:
Subject: Raster maps in GRASS monitor show unwanted color stripe on left side
what I discover some time ago and looks like a small map shift (or whatever):
Raster maps in GRASS monitor sometimes show unwanted color stripe on left side.
For illustration I have generated a snapshot:
http://mpa.itc.it/markus/tmp/grassmon_stripe.jpg
(Lat/Long).
This appears also in projected locations but not always (I do not know a way yet
to reproduce it with Spearfish)
AFAICT, this is due to rounding error in src/libes/display/cnversions.c
(D_do_conversions et al). By simplifying the computations in that file, I
can get the problem to go away. However, there might be programs which
are already compensating for the problem, so the fix could cause problems
there. Anything which uses the display library should be re-tested.
I removed some of the D_get_?_to_?_[xy]conv() functions, as the factors
were the wrong way around (in the sense that x/y != x*(1/y) when dealing
with floating-point). This only affected d.scale and d.barscale, and
those won't be problematic.
I've changed raster.c and raster_rgb.c to use the pixel's centre rather
than its top-left corner. I also changed d.what.rast to use the same
mechanism, so the results should be consistent; initial experiments
(using a 320x200 display to allow selecting specific pixels) confirm
this.
The complete set of files touched by the changes is:
src/display/d.barscale/cmd/draw_scale.c
src/display/d.scale/cmd/draw_scale.c
src/display/d.what.rast/cmd/what.c
src/include/display.h
src/libes/display/cnversions.c
src/libes/display/raster.c
src/libes/display/raster_rgb.c
--
Glynn Clements <glynn.clements@virgin.net>