[GRASS-dev] Inclusion of r.surf.nnbathy in main svn: How to handle nn code ?

Hello,

As some of you will have seen a discussion was launched on the GRASS
users list concerning the possible inclusion of r.surf.nnbathy into the
main SVN.

However, the script needs Pavel Sakov's nn code. As Pavel changed jobs,
the code is not available on the old web site anymore. However, he has
sent me the code, and I've temporarily put it on my machine [1]. As Pavel says:

This is a mature code, developed since 1999 or 2000. I do not expect much development other than
fixing occasional bugs, which are reported at a rate < 1 / year (incidentally, I am fixing a minor bug right now).

I will be very happy if you could host this library. Just let me know how to submit an upgrade when it becomes available.

The question now is whether it would be possible to include the code
directly into the GRASS tree. However, there seems to be a license issue:

On 24/09/08 10:34, Pavel Sakov wrote:

This question has been already discussed by GRASS developers a couple of years ago, and the problem is the license of `triangle', which is used for underlying Delaunay triangulation in `nn'. `triangle' is freely available for non-commercial use only:

"Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT
WITH THE AUTHOR."

This is not a huge problem on its own. One could replace `triangle' by `qhull', like it has been done some 5 years ago by Fernando Cardoso (by memory) for integrating `nn' in Octave. However, `triangle' uses
exact arithmetics and never fails. Interpolating for DEMs, e.g. from digitised contours creates a lot of
numerically challenging situations in regard to both triangulation and interpolation. I do not know
how robust qhull is in numerically extreme situations...

A quick way to proceed could be to maintain the status-quo: host `nn' and let the end user decide whether
he can use `triangle' or not.

Any suggestions on how to deal with this ?

Moritz

Moritz Lennert wrote:

As some of you will have seen a discussion was launched on the GRASS
users list concerning the possible inclusion of r.surf.nnbathy into
the main SVN.

However, the script needs Pavel Sakov's nn code. As Pavel changed jobs,
the code is not available on the old web site anymore. However, he has
sent me the code, and I've temporarily put it on my machine [1]. As

....

The question now is whether it would be possible to include the code
directly into the GRASS tree. However, there seems to be a license
issue:

Pavel Sakov wrote:
> This question has been already discussed by GRASS developers a couple
> of years ago, and the problem is the license of `triangle', which is
> used for underlying Delaunay triangulation in `nn'. `triangle' is
> freely available for non-commercial use only:

there is also the issue of the nnbathy license I asked about yesterday,
wrt transfer of copyright and the non-commercial use clause.
Does Pavel have the power to relicense his code as GPL?
If not, the user must always build it themselves regardless of the
status of triangle or a triangle replacement.

> This is not a huge problem on its own. One could replace `triangle'
> by `qhull', like it has been done some 5 years ago by Fernando Cardoso
> (by memory) for integrating `nn' in Octave. However, `triangle' uses
> exact arithmetics and never fails. Interpolating for DEMs, e.g. from
> digitised contours creates a lot of numerically challenging
> situations in regard to both triangulation and interpolation. I do
> not know how robust qhull is in numerically extreme situations...

perhaps the recent Google SoC v.delaunay2 project by Martin Pavlovsky
could help here?
  http://trac.osgeo.org/grass/browser/grass-addons/vector/v.delaunay2

> A quick way to proceed could be to maintain the
> status-quo: host `nn' and let the end user decide
> whether he can use `triangle' or not.

Unless the code is all GPL compatible I don't think we can host it on
the GRASS SVN or addons SVN. Perhaps at another OSGeo server or on
SourceForge? Personal websites are fine in the short term, but have a
habit of moving on after a few years and the code becomes lost.

Hamish