Difference between revisions of "TIN with breaklines"

From GRASS-Wiki
Jump to: navigation, search
m
m
Line 6: Line 6:
 
</p>
 
</p>
 
<h2> &lt;v.triangle&gt; module<br />  </h2>
 
<h2> &lt;v.triangle&gt; module<br />  </h2>
<p>Add-on module <a rel="nofollow" class="external text" href="https://raw.github.com/amuriy/GRASS-scripts/master/v.triangle">v.triangle</a> was written as attempt to close this gap. It's simply a "front-end" to the famous utility <a rel="nofollow" class="external text" href="http://www.cs.cmu.edu/~quake/triangle.html">Triangle</a> of J.R. Shewchuk, which makes exact Delaunay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations and high-quality triangular meshes. On GIS terminology, it produces 2D TIN, optionally with "breaklines".  
+
<p>Add-on module &lt;a rel="nofollow" class="external text" href="https://raw.github.com/amuriy/GRASS-scripts/master/v.triangle"&gt;v.triangle&lt;/a&gt; was written as attempt to close this gap. It's simply a "front-end" to the famous utility &lt;a rel="nofollow" class="external text" href="http://www.cs.cmu.edu/~quake/triangle.html"&gt;Triangle&lt;/a&gt; of J.R. Shewchuk, which makes exact Delaunay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations and high-quality triangular meshes. On GIS terminology, it produces 2D TIN, optionally with "breaklines".  
 
</p><p>Module is a shell script that implements the main &lt;Triangle&gt; options and use it as "filter" to produce 2D TIN from the vector points/lines data. To use script you must to compile &lt;Triangle&gt; first and add it to system $PATH.<br />  
 
</p><p>Module is a shell script that implements the main &lt;Triangle&gt; options and use it as "filter" to produce 2D TIN from the vector points/lines data. To use script you must to compile &lt;Triangle&gt; first and add it to system $PATH.<br />  
 
</p><p><br />  
 
</p><p><br />  
</p><p><u><b>Usage:</b></u><br /> <b>v.triangle</b> [-cdqalysif] <i>points</i>=name [<i>lines</i>=name] <i>tin</i>=name<br /> [<i>max_area</i>=name] [<i>min_angle</i>=name] [<i>steiner_points</i>=name] [<i>save</i>=name]<br /><br />
+
</p><p><u><b>Usage:</b></u><br /> <b>v.triangle</b> [-cdqalysif] <i>points</i>=name [<i>lines</i>=name] <i>tin</i>=name<br /> [<i>max_area</i>=name] [<i>min_angle</i>=name] [<i>steiner_points</i>=name] [<i>save</i>=name]<br /><br />  
</p><p><u><b>Flags:</b></u><br /> <b>-c</b>&#160; Conforming constrained Delaunay triangulation without angle or area constraints<br /> <b>-d</b>&#160; Conforming Delaunay triangulation<br /> <b>-q</b>&#160; Quality mesh generation (all angles are between 20 and 140 degrees)<br /> <b>-a</b>&#160; Imposes a maximum triangle area constraint<br /> <b>-l</b>&#160; Uses only vertical cuts in the divide-and-conquer algorithm<br /> <b>-y</b>&#160; Prohibits the insertion of Steiner points on the mesh boundary<br /> <b>-s&#160;</b> Specifies the maximum number of added Steiner points<br /> <b>-i&#160;</b> Uses the incremental algorithm for Delaunay triangulation, rather than the divide-and-conquer algorithm<br /> <b>-f</b>&#160; Uses Steven Fortune's sweepline algorithm for Delaunay triangulation, rather than the divide-and-conquer algorithm<br /> <b>--o</b>&#160; Allow output files to overwrite existing files<br /> <b>--v</b>&#160; Verbose module output<br /> <b>--q&#160;</b> Quiet module output <br />
+
</p><p><u><b>Flags:</b></u><br /> <b>-c</b>&#160; Conforming constrained Delaunay triangulation without angle or area constraints<br /> <b>-d</b>&#160; Conforming Delaunay triangulation<br /> <b>-q</b>&#160; Quality mesh generation (all angles are between 20 and 140 degrees)<br /> <b>-a</b>&#160; Imposes a maximum triangle area constraint<br /> <b>-l</b>&#160; Uses only vertical cuts in the divide-and-conquer algorithm<br /> <b>-y</b>&#160; Prohibits the insertion of Steiner points on the mesh boundary<br /> <b>-s&#160;</b> Specifies the maximum number of added Steiner points<br /> <b>-i&#160;</b> Uses the incremental algorithm for Delaunay triangulation, rather than the divide-and-conquer algorithm<br /> <b>-f</b>&#160; Uses Steven Fortune's sweepline algorithm for Delaunay triangulation, rather than the divide-and-conquer algorithm<br /> <b>--o</b>&#160; Allow output files to overwrite existing files<br /> <b>--v</b>&#160; Verbose module output<br /> <b>--q&#160;</b> Quiet module output <br />  
 
</p><p><u><b>Parameters:</b></u><br /> <i><b>points</b></i> &#160; Input vector map containing points<br /> <i><b>lines</b></i>&#160; Input vector map containing breaklines<br /> <i><b>tin</b></i>&#160; Name of output vector map (TIN)<br /> <i><b>max_area</b></i> &#160; Maximum triangle area (use with "-a" flag)<br /> <i><b>min_angle</b></i>&#160; Minimum mesh angle (use with "-q" flag)<br /> <i><b>steiner_points</b></i>&#160; Specifies the maximum number of Steiner points that may be inserted into the mesh (use with "-s" flag)<br /> <i><b>save</b></i> &#160; Path to save &lt;Triangle&gt; working files (*.node,*.poly,*.edge,*.ele,*.off). By default uses current location directory<br />  
 
</p><p><u><b>Parameters:</b></u><br /> <i><b>points</b></i> &#160; Input vector map containing points<br /> <i><b>lines</b></i>&#160; Input vector map containing breaklines<br /> <i><b>tin</b></i>&#160; Name of output vector map (TIN)<br /> <i><b>max_area</b></i> &#160; Maximum triangle area (use with "-a" flag)<br /> <i><b>min_angle</b></i>&#160; Minimum mesh angle (use with "-q" flag)<br /> <i><b>steiner_points</b></i>&#160; Specifies the maximum number of Steiner points that may be inserted into the mesh (use with "-s" flag)<br /> <i><b>save</b></i> &#160; Path to save &lt;Triangle&gt; working files (*.node,*.poly,*.edge,*.ele,*.off). By default uses current location directory<br />  
 
</p><p><br />  
 
</p><p><br />  
Line 16: Line 16:
 
<h2> Example<br />  </h2>
 
<h2> Example<br />  </h2>
 
<p>The following example was produced using ESRI sample data (masspoints and breaklines) to compare TIN's made in using ArcView 3D Analyst and Triangle.<br />  
 
<p>The following example was produced using ESRI sample data (masspoints and breaklines) to compare TIN's made in using ArcView 3D Analyst and Triangle.<br />  
</p><p>The command used: ''<i><b>v.triangle -c points=pts lines=lines tin=tin</b></i><br />  
+
</p><p>The command used: <i><b>v.triangle -c points=pts lines=lines tin=tin</b></i><br />
</p><p><br />
 
</p><p>[[/wiki/File:ArcView_GRASS_TIN_breaklines_l.png|[[Image:|1118x540px]]]]
 
 
</p><p><br />
 
</p><p><br />
</p><p><a href="/grass-wiki/index.php?title=Sv:Main_Page/sv&amp;action=edit&amp;redlink=1" class="new" title="Sv:Main Page/sv (страница не существует)">sv:Main Page/sv</a>
+
</p><p><a href="/wiki/File:ArcView_GRASS_TIN_breaklines.png" class="image" title="RTENOTITLE"><img alt="RTENOTITLE" src="/grass-wiki/images/ArcView_GRASS_TIN_breaklines.png" width="800" height="387" /></a><br />
 
</p>
 
</p>

Revision as of 03:34, 23 April 2012

TIN


Triangular irregular networks (TIN) are widely spread in GIS community (in ESRI software, other commercial GIS and CAD) to represent surface morphology.

The most common way of TIN construction is Delaunay triangulation. GRASS has module <v.delaunay> to do this task, but it don't work with "breaklines", e.g. with constrained Delaunay triangulation.


<v.triangle> module

Add-on module <a rel="nofollow" class="external text" href="https://raw.github.com/amuriy/GRASS-scripts/master/v.triangle">v.triangle</a> was written as attempt to close this gap. It's simply a "front-end" to the famous utility <a rel="nofollow" class="external text" href="http://www.cs.cmu.edu/~quake/triangle.html">Triangle</a> of J.R. Shewchuk, which makes exact Delaunay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations and high-quality triangular meshes. On GIS terminology, it produces 2D TIN, optionally with "breaklines".

Module is a shell script that implements the main <Triangle> options and use it as "filter" to produce 2D TIN from the vector points/lines data. To use script you must to compile <Triangle> first and add it to system $PATH.


Usage:
v.triangle [-cdqalysif] points=name [lines=name] tin=name
[max_area=name] [min_angle=name] [steiner_points=name] [save=name]

Flags:
-c  Conforming constrained Delaunay triangulation without angle or area constraints
-d  Conforming Delaunay triangulation
-q  Quality mesh generation (all angles are between 20 and 140 degrees)
-a  Imposes a maximum triangle area constraint
-l  Uses only vertical cuts in the divide-and-conquer algorithm
-y  Prohibits the insertion of Steiner points on the mesh boundary
-s  Specifies the maximum number of added Steiner points
-i  Uses the incremental algorithm for Delaunay triangulation, rather than the divide-and-conquer algorithm
-f  Uses Steven Fortune's sweepline algorithm for Delaunay triangulation, rather than the divide-and-conquer algorithm
--o  Allow output files to overwrite existing files
--v  Verbose module output
--q  Quiet module output

Parameters:
points   Input vector map containing points
lines  Input vector map containing breaklines
tin  Name of output vector map (TIN)
max_area   Maximum triangle area (use with "-a" flag)
min_angle  Minimum mesh angle (use with "-q" flag)
steiner_points  Specifies the maximum number of Steiner points that may be inserted into the mesh (use with "-s" flag)
save   Path to save <Triangle> working files (*.node,*.poly,*.edge,*.ele,*.off). By default uses current location directory


Example

The following example was produced using ESRI sample data (masspoints and breaklines) to compare TIN's made in using ArcView 3D Analyst and Triangle.

The command used: v.triangle -c points=pts lines=lines tin=tin


<a href="/wiki/File:ArcView_GRASS_TIN_breaklines.png" class="image" title="RTENOTITLE"><img alt="RTENOTITLE" src="/grass-wiki/images/ArcView_GRASS_TIN_breaklines.png" width="800" height="387" /></a>