[GRASS5] Fw: d.area progress report...

Eric G. Miller egm2 at jps.net
Tue Jan 22 11:39:52 EST 2002


On Tue, 22 Jan 2002 11:37:35 +0000, Michel Wurtz <mw at teledetection.fr> wrote:

[snip]
> Eric,
> I developped some 20 years ago (before X11) a set of functions for
> a graphic card in order to create a graphical GUI similar to the
> Suntools one.
> Searching in my archives (Yes, I keeped the C code), I found some
> functions very useable for d.area : the first adds one boundary,
> the second finish the process.  the filling routine is passed as
> a parameter : my implementation had the possibility to fill with
> plain color or with a pattern.
> The algorithm is just based on the traversal of elementary segments,
> so holes and twisted polygons are managed.
> We should adapt the code for d.area (but the commentaries are all in
> french ;-)
> I have not keeped the code for filling, but It was very hardware
> dependant, and I could easely rewrote it. BTW, I think it may be
> done in the monitor driver (the drawing function's parameters are
> the row number, the start and end column in monitor coordinates).

It might be useful.  I understand already the general scanline
conversion (which GRASS does via G_plot_polygon).  However,
G_plot_polygon can not handle eliminating nested areas/holes.
What I'm doing is breaking up the exterior with interiors
such that a set of simple exterior polygons (no holes) are
formed.

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list