[GRASS5] Bug: vector maps shifted (d.area / d.vect)

Markus Neteler neteler at itc.it
Sun Oct 21 07:55:33 EDT 2001


On Sat, Oct 20, 2001 at 12:44:41PM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > just found an inconsistency: d.area draws maps
> > shifted to north-west.
> > 
> > I have generated a polygon with r.digit, the vectorized
> > with r.poly. Comparing d.vect and d.rast the overlay
> > looks perfect, while d.area produces a shifted result.
> > Also v.area is not consistent (I guess d.area and v.area
> > have a similar code history).
> 
> d.vect uses G_plot_line() (in src/libes/gis/plot.c), which (in
> fastline()) adds 0.5 to each coordinate. d.area doesn't use this
> function.
> 
> If you remove the +0.5 from fastline(), d.vect and d.area coincide. 
> However, G_plot_line() is used in many places, so changing it to suit
> d.vect may break other things.

Thanks for looking into it. But I wouldn't call it "breaking things":
For 5.0 the display needs to be consistent in my opinion, we should
not accept map shifts. I am willing to search-and-fix, but need a
hint what route to follow.

Raster and vector overlays should be 100% o.k.

Markus



More information about the grass-dev mailing list