[GRASS5] HTMLMAP driver: d.area (old) vs. d.vect.area

Glynn Clements glynn.clements at virgin.net
Sun Jan 25 16:51:28 EST 2004


Markus Neteler wrote:

> the HTMLMAP driver seems to have some problems with
> d.vect.area. As d.area is deprecated, the driver seems to
> need an update to work with d.vect.area.
> The problem might be related to the fact that d.area
> was using R_polygon_abs() while d.vect.area doesn't.
> 
> Is there anything we can do for HTMLMAP driver?
> I'm not too familiar with R_*() functions.

The only operations which HTMLMAP actually implements are
R_polygon_abs() and R_text(); everything else is a stub.

d.vect.area uses G_plot_area(), which fills an area by drawing lots of
horizontal lines (with R_move_abs() and R_cont_abs()). The driver only
gets to "see" the individual lines.

To make HTMLMAP work with d.vect.area, it would need functionality
similar to r.poly, i.e. converting the "rasterised" polygon back to
vectors. Also, you would need to use the legend= option so that each
polygon was a different colour, so that adjacent polygons can be
distinguished.

Alternatively, I suppose that you could create a map with lots of
1-pixel-high rectangles, although that would result in rather bloated
HTML.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list