[GRASS-dev] Library changes

Glynn Clements glynn at gclements.plus.com
Sun Jul 23 01:09:21 EDT 2006


Now that 6.1 has its own branch, I've made some relatively invasive
library changes.

The first is replacing the raster library with a version which can
perform driver-less rendering.

If the environment variable GRASS_RENDER_IMMEDIATE is set to TRUE, any
d.* commands won't attempt to communicate with a driver, but will use
a built-in PNG driver. All environment variables recognised by the PNG
driver apply; additionally, the environment variable GRASS_FONT
determines the font used (as the internal driver doesn't persist
between d.* commands, you can't use d.font to change the font).

This should simplify programs such as gis.m, as it isn't necessary to
manage a separate driver process.

The second change is a modification to the raster I/O code in lib/gis. 
The G__.fileinfo array is now dynamically allocated, so there is no
MAXFILES constant.

The number of maps which can be used by modules such as r.series
should only be constrained by OS limitations (e.g. maximum number of
open files, maximum length of a command line etc), and by any
limitations in the module itself (r.series doesn't have any; the
arrays which have one entry per map are dynamically allocated
according to the number of inputs).

This change also reduces the base memory usage of libgis from ~350KiB
to ~100KiB (as it eliminates 256 statically-allocated fileinfo
structures), which may help on palmtops etc.

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




More information about the grass-dev mailing list