[GRASS5] Bug: vector maps shifted (d.area / d.vect)
Eric G. Miller
egm2 at jps.net
Sun Oct 21 15:59:12 EDT 2001
I've known about this discrepancy since I started hacking on d.area late
last spring. I thought I mentioned it here at least once, but the info
probably got lost with other discussions.
When I looked at the library code, I recall seeing a comment that said
<whoever> wasn't sure that adding 0.5 at one point was correct. I tried
at one point to fiddle with adding 0.5 using the D_u_to_d_{col | row},
but the results never matched.
Anyway, it's quite possible to just rewrite d.area to use the G_plot_line()
and G_plot_polygon() routines. I already did it once with a version that
used some non-redistributable code for handling polygon holes properly.
That version does line up exactly with d.vect output, but unfortunately
I never got permission to distribute the polygon simplification code ;-(.
This unreleased version also properly clips polygons to the display
area and allows for selective drawing based on "cats" values. I can
attempt to merge in those changes while leaving out the code from
another source. It'll require a bit of a rewrite of the "screenpoly"
routines, since G_plot_{line,area} want map coordinates instead of
screen coordinates.
In my opinion, with the "cats" selective drawing support, d.area would
mostly obsolete d.vect.cats (which doesn't handle polygon holes).
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-dev
mailing list