[GRASS-user] DTM/DEM to TIN

As far as I can see GRASS doesn’t provide any ready-to-go tool to generate TINs from grid digital elevation models. I know I can transform a grid to a regular mesh somehow (probably using the Triangle lib for the last step) but I can’t find tools to generate TINs, given a certain amount of tolerance, which preserve significative locations (like those obtained by TPI for example) and shapes (in a morphonetric sense).

Does anybody has experience on this? The general aim is generating terrain meshes (to be further decimated for LODs) to be employed in a 3D context.

Cheers,
giovanni

Hi.

···

I can’t find tools to generate TINs, given a certain amount of tolerance, which preserve significative locations (like those obtained by TPI for example) and shapes (in a morphonetric sense)

Does the v.triangle add-on accomplish the goal?

https://raw.githubusercontent.com/amuriy/GRASS-scripts/a7df12d996abfe6461f509fce6feb6c869af2d5e/v.triangle

Mark

Hi Mark,
thanks for the reply but it’s not what I’m looking for. v.triangle is a front-end to Triangle, to generate a Delaunay triangulation on points and, eventually, breaklines.
I’m lookink for something that generates a TIN from an elevation grid (raster).

giovanni

···

I can’t find tools to generate TINs, given a certain amount of tolerance, which preserve significative locations (like those obtained by TPI for example) and shapes (in a morphonetric sense)

Does the v.triangle add-on accomplish the goal?

https://raw.githubusercontent.com/amuriy/GRASS-scripts/a7df12d996abfe6461f509fce6feb6c869af2d5e/v.triangle

Mark

giohappy wrote

Hi Mark,
thanks for the reply but it's not what I'm looking for. v.triangle is a
front-end to Triangle, to generate a Delaunay triangulation on points and,
eventually, breaklines.
I'm lookink for something that generates a TIN from an elevation grid
(raster).

giovanni
Il 05/dic/2014 14:14 "Mark Seibel" <

mseibel@

> ha scritto:

Hi.

I can't find tools to generate TINs, given a certain amount of
tolerance, which preserve significative locations (like those obtained
by
TPI for example) and shapes (in a morphonetric sense)

Does the v.triangle add-on accomplish the goal?

https://raw.githubusercontent.com/amuriy/GRASS-scripts/a7df12d996abfe6461f509fce6feb6c869af2d5e/v.triangle

Mark

_______________________________________________
grass-user mailing list

grass-user@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-user

maybe some ideas there:

http://grasswiki.osgeo.org/wiki/Triangle_Mesh

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/DTM-DEM-to-TIN-tp5176619p5176638.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Fri, Dec 5, 2014 at 6:01 AM, G. Allegri <giohappy@gmail.com> wrote:

As far as I can see GRASS doesn't provide any ready-to-go tool to generate
TINs from grid digital elevation models. I know I can transform a grid to a
regular mesh somehow (probably using the Triangle lib for the last step)
but I can't find tools to generate TINs, given a certain amount of
tolerance, which preserve significative locations (like those obtained by
TPI for example) and shapes (in a morphonetric sense).

Does anybody has experience on this? The general aim is generating terrain
meshes (to be further decimated for LODs) to be employed in a 3D context.

I'm not sure if this would fulfill your requirements but I would use
v.delaunay [1]. To get the points, you can use v.random [2, 3] or some more
clever method.

Vaclav

[1] http://grass.osgeo.org/grass70/manuals/v.delaunay.html
[2]
http://courses.ncsu.edu/mea582/common/GIS_anal_grass/GIS_Anal_grinterp1.html
[3] http://grass.osgeo.org/grass70/manuals/v.random.html

Cheers,
giovanni

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Thanks for the suggestions. I already had a look at that page, but nothing seems to fulfill my requirements.
Using v.random is not a solution. I should select significative points, and significative lines, to feed Triangle. Random selection will probably miss important locations (e.g. peaks, etc.).

giovanni

···

2014-12-05 15:57 GMT+01:00 Vaclav Petras <wenzeslaus@gmail.com>:

On Fri, Dec 5, 2014 at 6:01 AM, G. Allegri <giohappy@gmail.com> wrote:

As far as I can see GRASS doesn’t provide any ready-to-go tool to generate TINs from grid digital elevation models. I know I can transform a grid to a regular mesh somehow (probably using the Triangle lib for the last step) but I can’t find tools to generate TINs, given a certain amount of tolerance, which preserve significative locations (like those obtained by TPI for example) and shapes (in a morphonetric sense).

Does anybody has experience on this? The general aim is generating terrain meshes (to be further decimated for LODs) to be employed in a 3D context.

I’m not sure if this would fulfill your requirements but I would use v.delaunay [1]. To get the points, you can use v.random [2, 3] or some more clever method.

Vaclav

[1] http://grass.osgeo.org/grass70/manuals/v.delaunay.html
[2] http://courses.ncsu.edu/mea582/common/GIS_anal_grass/GIS_Anal_grinterp1.html
[3] http://grass.osgeo.org/grass70/manuals/v.random.html

Cheers,
giovanni


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/giohappy
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus

I’ve just discoevered r.refine, which seems to do exactly what I need :wink:
https://github.com/jontodd/r.refine

giovanni

···

2014-12-05 16:21 GMT+01:00 G. Allegri <giohappy@gmail.com>:

Thanks for the suggestions. I already had a look at that page, but nothing seems to fulfill my requirements.
Using v.random is not a solution. I should select significative points, and significative lines, to feed Triangle. Random selection will probably miss important locations (e.g. peaks, etc.).

giovanni

2014-12-05 15:57 GMT+01:00 Vaclav Petras <wenzeslaus@gmail.com>:

Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/giohappy
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus

On Fri, Dec 5, 2014 at 6:01 AM, G. Allegri <giohappy@gmail.com> wrote:

As far as I can see GRASS doesn’t provide any ready-to-go tool to generate TINs from grid digital elevation models. I know I can transform a grid to a regular mesh somehow (probably using the Triangle lib for the last step) but I can’t find tools to generate TINs, given a certain amount of tolerance, which preserve significative locations (like those obtained by TPI for example) and shapes (in a morphonetric sense).

Does anybody has experience on this? The general aim is generating terrain meshes (to be further decimated for LODs) to be employed in a 3D context.

I’m not sure if this would fulfill your requirements but I would use v.delaunay [1]. To get the points, you can use v.random [2, 3] or some more clever method.

Vaclav

[1] http://grass.osgeo.org/grass70/manuals/v.delaunay.html
[2] http://courses.ncsu.edu/mea582/common/GIS_anal_grass/GIS_Anal_grinterp1.html
[3] http://grass.osgeo.org/grass70/manuals/v.random.html

Cheers,
giovanni


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/giohappy
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus

On 05/12/14 16:24, G. Allegri wrote:

I've just discoevered r.refine, which seems to do exactly what I need :wink:
https://github.com/jontodd/r.refine

Looks great. Maybe you can convince the author to put the code into the GRASS addons SVN ?

Moritz

2014-12-05 17:37 GMT+01:00 Moritz Lennert <mlennert@club.worldonline.be>:

On 05/12/14 16:24, G. Allegri wrote:

I've just discoevered r.refine, which seems to do exactly what I need :wink:
https://github.com/jontodd/r.refine

Looks great. Maybe you can convince the author to put the code into the
GRASS addons SVN ?

I'm tryong to contact him. No reply yet.
The GRASS code would need an upgrade because it's based on old APIs...

Moritz

--
Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/_giohappy_
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus

Hi Giovanni,

A module for this would be really neat! I am not sure if this will be helpful, but here is what I have done in the past.

Set your region of interest of course. My notes indicate that I had to add an extra unit to the north and west region (not sure why).

r.out.vtk -v input=dem@PERMANENT output=dem.vtk elevation=dem@PERMANENT

# 'preserve normals' option kills Meshlab with DEM!

r.out.vtk -v input=dem@PERMANENT output=dem.vtk elevation=dem@PERMANENT

I then open dem.vtk in Paraview, and run the Delaney 2D filter (default options) save as .PLY file.

Next I open the resulting .PLY file in Meshlab and run Quadric based edge collapse strategy - specify desired triangles, preserve normals and I save as .OBJ file. For my needs I choose "Preserve boundary of mesh”.

Cheers,

Jeshua Lacock
Founder/Engineer
3DTOPO Incorporated
<http://3DTOPO.com>
Phone: 208.462.4171