[GRASS-dev] Re: [tlaronde: ticket #542: vector for GRASS 7]

Soeren Gebbert soerengebbert at googlemail.com
Sun Dec 6 12:32:28 EST 2009


Hello,
thanks for the very interesting discussion.
My two cents regarding the delaunay triangulation:

>
>> Triangulation, Delaunay are a critical part of what should be here in
>> a GIS (GPL GRASS has things as far as I know; KerGIS not for
>> the moment).
>
> modern grass has those things, but they need some finishing touches AFAIU.
> see past Google Summer of Code projects.
>
> if you wanted to be a hero :) you could work on a BSD version of this:
>  http://www.cs.cmu.edu/~quake/triangle.html
>
> (very well implemented but non-free for commercial use*, so sadly mostly
> unusable..)
>
> [*] I think that's fair enough if the author wants it, except for the
> NSF (public) funding of it.

I have implemented a connection layer between GRASS and VTK
(www.vtk.org). Therefor all of the
VTK vector and image processing algorithms can process natively GRASS datasets.
And so the very good delaunay triangulation algorithms for 2d and 3d data:
http://www.vtk.org/doc/release/5.4/html/a00404.html
http://www.vtk.org/doc/release/5.4/html/a00405.html
No need to re-implement the wheel. ;)

Example:
The delaunay triangulation grass-vtk python module:
http://code.google.com/p/vtk-grass-bridge/source/browse/trunk/Examples/v.delaunay2d.py
Computation time is quite equal to v.delaunay. But it ships better
documentation and several
options to optimize the output.

You can also convert raster maps into vector TIN's:
Here an example how to convert an elevation raster map into a TIN
using a VTK algorithm:
http://code.google.com/p/vtk-grass-bridge/source/browse/trunk/Examples/r.to.tin.py
* Results:
http://code.google.com/p/vtk-grass-bridge/wiki/rToTinResults

I have tested this algorithm with large datasets with more than 64
million cells creating
a TIN with about 3 million triangles. Memory usage is about 1.5 Gig.
Computation time ~20min
on Intel core2 with 2.1 Ghz.

VTK is licensed under a BSD license. Therefor you can implement
commercial algorithms in VTK
and use it in GRASS via the vtk-grass connection layer.


Best regards
Soeren


More information about the grass-dev mailing list