[GRASS-dev] natural neighbor in G7?

Moritz Lennert mlennert at club.worldonline.be
Mon Apr 14 09:03:18 PDT 2014


On 14/04/14 17:34, Moritz Lennert wrote:
> On 08/04/14 14:03, Martin Landa wrote:
>> Hi all,
>>
>> potentially I have a student who could spend some time on this topic.
>> Currently we have for G6 an addons module (bash script) [1] which
>> depends on nn-c library [2]. This library is distributed under MIT
>> licence, but partly it's depending on tringle library [3] (Delaunay
>> triangulation) which is not really open source.
>>
>> I see three possible options:
>>
>> 1) create new GRASS lib for nn from scratch (this is probably to much
>> for student work)
>> 2) use open source lib which has nn implemented, eg. CGAL [4]. This
>> would require a new dependency for GRASS. CGAL is very powerful
>> library and could be probably used by other modules in the future.
>
> Do you have an idea how CGAL compares to GEOS ? Could the former replace
> the latter for those functions where GEOS is used ?
>
>> 3) use nn-c and replace triangle lib by open source solution (in GRASS
>> we have Delaunay triangulation so probably it could be reused?) nn-c
>> is distributed under MIT licence so it could be probably integrated to
>> the main code as an extenal library (lib/external) if I am right...
>
>
> I think you can even integrate it into the main code. The result will be
> GPL'ed, even if the original code by itself remains under MIT.
>
> If 3) is possible I would think it is preferable to 2, unless we see a
> lot of other uses for CGAL in GRASS.

One additional reflection, though: I don't think that CGAL provides a 
C-API which, IIUC, would mean that the module would have to be 
programmed in C++. Somewhat of a showstopper...

Moritz


More information about the grass-dev mailing list