[GRASS-dev] discussion: replacing ps.map

Glynn Clements glynn at gclements.plus.com
Wed Mar 28 18:18:55 EDT 2007


tlaronde at polynum.com wrote:

> > Thierry, I have a very vague memory that you said something about KerGIS 
> > being able to directly produce vectorized output. Is this true ? How do 
> > you do this ?
> 
> By using the legacy RASTERLIB now called DRAWLIB in KerGIS. The
> documentation about the library is misleading. It is not raster oriented
> if you take juste the library that is just an API and a communication
> facility to monitors. The API is a drawing API: you draw not only raster
> images, but lines, polylines etc.
> 
> In KerGIS, there is only one driver: the X11 one. And it uses the X11
> vector drawing XLIB functions for lines etc.
> 
> In this sense, it is not difficult to implement a psdriver.

It isn't difficult to implement, but it won't necessarily be of much
use given the existing API.

The main issue is the use of "pixels" for coordinates.

There is also a fair amount of code which makes certain assumptions
about the end results of certain drawing operations. E.g. the default
mechanism used by d.vect to render filled polygons is to use
G_plot_polygon() to render a series of horizontal lines.

Also, rasters are scaled by the client to the desired dimensions in
pixels, with the scaled data being sent to the driver, which renders
it without further scaling.

I have changed this in the current CVS version; the drivers now
provide a scaled-raster operation, which is more suitable for a
PostScript driver.

I have also added higher-level interfaces to most of the drawing
primitives (lib/display/draw2.c), but it will be a lot of work to
migrate the modules away from the lower-level R_* functions.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list