[GRASS5] TODOs for 5.0.0

Glynn Clements glynn.clements at virgin.net
Thu Aug 9 07:56:43 EDT 2001

Bernhard Reiter wrote:

> > > So, what's remaining to do for 5.0.0?
> > > Starting a list:
> > > 
> > >  - GDAL changes need to go into release_branch
> > >  - NVIZ crashes on Redhat 7.1 (even I cannot use it any more :-((  )
> > >  - what else?
> > 
> > one more:
> > - the src/libes/gmath/ contains routines to replace the
> >   "Numerical Receipes in C" functions. The "NR" use for GRASS is
> >   granted, but it is not GPL compliant.
> And even worse: It is not Free Software!!!
> >   I have already been moving this numerical code from the individual modules
> >   to src/libes/gmath/ to assemple same functionality in one place. Glynn has
> >   been extending it. However, at time added new code to replace the NR
> >   functions is not used yet, but still the "old" NR functions are in use.
> >   This is the last GPL limitation in GRASS, eventually todo for 5.0.0?!
> We _must_ fix this for GRASS 5.0.0, 
> because it would render GRASS 5.0.0 non-free otherwise
> and we could not distribute it.

AFAIK, the list of affected functions is:

+ del2g - Used by i.zc, i.shape.

Not itself encumbered, but depends upon fft.

+ egvorder/egvorder2 - Used by i.cca, i.pca.

I've added new versions of these which use mat_struct. However, it
would probably be quicker to modify the new versions to use the old
prototype than to modify applications to use the mat_struct interface.

+ fft - Used by i.fft, r.surf.fractal.

Could be replaced with the FFTW library, but that solution:

a) adds another library dependency,

b) requires either that existing applications are re-written to use
the FFTW interface, or that we add code to convert between the
existing and FFTW interfaces (which might introduce inefficiency; I
don't know the semantics of the existing interface, so I can't tell).

+ gauss - Used by r.surf.fractal, r.surf.gauss.

Does anyone know of a GPL-compatible (GPL or public domain)
implementation of this function? If not, we would have to do without

+ jacobi - Used by i.cca

I have a description of Jacobi iteration in one of my mathematics
textbooks, but I haven't been able to figure out how that correlates
with the existing code. Can anyone provide a precise description of
the intended semantics?

+ rand1 - Used by r.surf.fractal, r.surf.gauss, r.surf.random.

Free PRNGs are readily available; the most obvious candidates are:

1. The ANSI C rand() and srand() functions.
2. The BSD random() and srandom() functions.

1 is available on all platforms, but some implementations have poor

2 may not be available on all platforms; it is available in BSD4.3
onwards, and in GNU libc. If it isn't available, 1 could be used
instead. Alternatively, the code could be taken from GNU libc.


If non-GPL code must be removed for the 5.0.0 release, and time is
pressing, I suggest simply removing the offending code, and either
removing dependent programs, or disabling them in src/CMD/lists/GRASS. 

I suspect that failure to work altogether is more likely to result in
a program being fixed than failure to comply with the GPL.

I'll work on egvorder/egvorder2 and rand1 initially.

I'm willing to work on fft/del2g and jacobi if someone can provide me
with test cases (test data and usage instructions) which exercise the
functions in question.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list