[GRASS5] TINs as 3D vectors

Pieter Bos pbos at itc.nl
Tue Apr 19 05:58:07 EDT 2005

Hmm, indeed, it does not, which means it can't be distributed with
GRASS. But should be ok to just use/distribute it as a add-on module
separately, as this is a separate program (right?). Not an ideal
solution indeed. Would have to email the author to find out. We're using
it for research purposes, which is allowed.

Conversion from Raster to TIN is not directly done, however, Triangle
handles a square grid of points just fine. I haven't tried r.to.vect,
but it looks like it can convert raster data to a vectormap with a point
for every pixel in the map, which is what is needed as input. It is
possible to simplify the surface a bit by removing adjacent triangles in
the same plane and replacing them by fewer triangles. This is currently
being finished.

With very small modifications it's possible to triangulate contour lines
as well.

Triangle works on quite large datasets, it should be able to handle a
million points in less than 20 seconds on a pentium II, according to the
Triangle website. However, GRASS will take quite a while building
topology in this case and will create huge files. Haven't tried anything
this big. We tried using some ascii raster data files and it worked
fine, but these only have about 55000-70000 points with a data value.
V.delaunay already has problems with this kind of amounts of data.

Data is stored in the same way as v.delaunay does it - GRASS format, an
area for every triangle. We didn't want to limit the use of other
modules with the data. It's far from ideal, however, real TIN support in
GRASS would be much faster, but also cost a lot of time to implement.

The alpha-shapes algorithm can be used to create triangulations that do
not form the convex hull of the set of points. It takes as input a
delaunay triangulation and creates a subset of the triangulation that
will look like the 'shape' of a set of points, using one parameter,
which defines the detail of the shape. This parameter can be set
automatically as well to include every point in at least one triangle,
which gives quite ok results. It works very well if you're using data
with a more or less regular sample density. This is completely written
by us because no suitable other implementation was found. No problems
with any license here. However, you would need some module to create a
delaunay triangulation, v.delaunay works fine for small datasets...



-----Original Message-----
From: Radim Blazek [mailto:blazek at itc.it] 
Sent: Tuesday, April 19, 2005 10:15 AM
To: Pieter Bos
Cc: GRASS Developers list
Subject: Re: [GRASS5] TINs as 3D vectors

Triangle does not appear to have a clear license compatible with GPL:

"Please note that although Triangle is freely available, it is
copyrighted by the author and may not be sold or included in commercial
products without a license."

Am I wrong? If you want to include that to GRASS distribution, the
library must have a license which gives at least the same rights as GPL.

Do you have a module for conversion from raster to TIN?

How do you store the data, do you use your format? Did you try to use 
GRASS format?


Pieter Bos wrote:
> There is no possibility of creating 3D-vectors from v.delaunay
> We are currently implementing a system for vague regions in GRASS that
> uses triangulations with 3D vectors, and have linked Triangle to
> Triangle is a much faster and memory efficient delaunay triangulation
> with support for constraints. See
> http://www-2.cs.cmu.edu/~quake/triangle.html for more information.
> As soon as everything is done we'll release a few useful GRASS
> including this better Delaunay triangulation and the 2D alpha-shape
> algorithm, and perhaps some 2D visualization of TINs which might be
> useful as a general module with some slight modifications. If you need
> it now I can send you the module.
> Regards,
> Pieter Bos
> -----Original Message-----
> From: grass5-admin at grass.itc.it [mailto:grass5-admin at grass.itc.it] On
> Behalf Of Jachym Cepicky
> Sent: Wednesday, April 13, 2005 2:10 PM
> To: GRASS Developers list
> Subject: [GRASS5] TINs as 3D vectors
> Hallo,
> is there any possibilty, how to create 3D-vector of TIN (triangulated
> irregular network) of the output from v.delauny? I have 3D points and
> v.delauny makes only 2D-polygons from it.. 
> I wrote some script which solves this, but before I post it, I would
> like to know, that I did not something useless.
> Thank you a lot
> Jachym
> --
> Jachym Cepicky
> e-mail: jachym.cepicky at centrum.cz
> URL: http://les-ejk.cz
> GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5

More information about the grass-dev mailing list