[GRASS-user] r.colors -e for G3d?

Glynn Clements glynn at gclements.plus.com
Wed Jun 22 07:31:33 EDT 2011


Soeren Gebbert wrote:

> The modules r3.colors and r3.colors.out are implement in the sources
> of r.colors and r.color.out using preprocessor macros. The g3d related
> code can be activated using -DUSE_RASTER3D while compilation.

You need to either:

1. Create r3.colors and r3.colors.out as real modules, not using
preprocessor hacks. Most of this can be done by copying and modifying
r.colors and r.colors.out.

2. Extend r.colors[.out] to handle both 2d and 3d rasters (i.e. a
run-time choice, not compile-time). The main drawback with this
approach is that the raster= option would become optional (there's no
way for the interface description to specify that you must use one
option from a set; this has to be checked in the code).

> The compilation of r3.colors and r3.colors.out is not enabled, because
> i don't know how to add different preprocessor flags for two commands
> in a single Makefile.

It can't be done, and that won't change.

r.terraflow.short was dropped from 7.0 for similar reasons (i.e. not
making a complete mess of the build system for the sake of a hack).

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


More information about the grass-user mailing list