GIS Tools

Language

Made withfor the GIS community

Triangulated Irregular Network (TIN) Generator

Create Delaunay triangulation from points

Geoprocessing

Drop files here or click to browse

Supported formats: GeoJSON

GeoJSON
Examples:

About TIN

  • Triangulated Irregular Network (TIN) from Delaunay triangulation
  • Maximizes minimum angle of triangles (no sliver triangles)
  • Useful for terrain modeling and interpolation
  • Dual of Voronoi diagram

What Is a Delaunay Triangulation in GIS?

A Delaunay triangulation connects a set of input points into a network of triangles such that no input point lies inside the circumcircle of any triangle. This property, called the Delaunay criterion, produces triangulations that maximize the minimum angle across all triangles β€” avoiding long skinny slivers and generally producing the "best" triangulation for interpolation and surface modeling. Delaunay triangulation GIS workflows underlie a huge range of analytical tasks, from 3D terrain modeling with triangulated irregular networks (TINs) to generating Voronoi diagrams and interpolating values across irregularly spaced observations.

The Triangulated Irregular Network (TIN) Generator on gis.tools lets you compute a Delaunay triangulation from any point layer directly in your browser. Drag in your GeoJSON, Shapefile, KML, or CSV with lat/lon (and optionally an elevation field), click Generate, and download the resulting triangle mesh as a GeoJSON MultiPolygon or a set of triangle features. The browser-based TIN generator is ideal for exploring surfaces, building Voronoi diagrams, or producing natural-neighbor interpolation surfaces without installing QGIS, ArcGIS, or PostGIS.

TINs are the vector-based analog of raster DEMs (Digital Elevation Models). Whereas a DEM stores elevation in a regular grid of cells, a TIN stores elevation at irregularly spaced vertices connected into triangles. TINs often represent terrain more efficiently because they concentrate detail in rugged areas and use fewer triangles in flat areas.

How Delaunay Triangulation Works

The classic algorithm is the incremental insertion method:

  1. Start with a large enclosing triangle that contains all input points
  2. Insert each point one at a time, finding the triangle that contains it
  3. Split that triangle into three new triangles connecting to the new point
  4. Check every affected triangle for the Delaunay criterion and flip edges as needed
  5. Remove the outer enclosing triangle at the end

Alternative algorithms include the Divide-and-Conquer approach (O(n log n), used by d3-delaunay) and Sweep-Line methods. All produce the same unique triangulation (assuming no four points are cocircular). The final TIN has exactly 2n βˆ’ 2 βˆ’ k triangles where n is the number of input points and k is the number of points on the convex hull.

Constrained Delaunay Triangulation

A constrained Delaunay triangulation forces certain edges (breaklines) to appear in the output, regardless of the Delaunay criterion. This is essential for terrain modeling when you need streams, ridgelines, or road edges to follow their true path.

2D vs 2.5D Triangulation

Standard Delaunay works in 2D. Terrain TINs are 2.5D: triangles live in the XY plane but vertices carry a Z value used to compute slopes, aspect, and interpolated elevations.

Key Parameters and Options

Elevation Field

Optionally select a numeric attribute to use as the Z value for each input point. The output can then be used as a terrain surface.

Constraint Lines

For constrained Delaunay, provide a second layer of breaklines that must appear in the output.

Output Format

Choose between individual triangle features (each with three vertices) or a merged triangle mesh (MultiPolygon).

Practical Applications

Terrain Modeling from Survey Points

Surveyors collect irregularly spaced elevation points and need to produce a TIN DEM for a project site. The Triangulation tool converts the point cloud into a triangle mesh ready for cut-fill analysis, contour generation, or 3D visualization.

Natural Neighbor Interpolation

The Delaunay triangulation is the foundation of natural neighbor interpolation, a smooth, edge-preserving method for estimating values at unsampled locations.

Voronoi Diagram Generation

Delaunay and Voronoi are geometric duals. The Voronoi polygons are derived directly from the Delaunay triangulation, so the same underlying computation powers both the Voronoi Polygons Generator and the TIN Generator.

Contour Line Generation

Once you have a TIN with Z values, you can extract contour lines by walking triangle edges where the surface crosses a contour elevation. Feed the TIN output into downstream contour generation tools.

Hydrological Flow Analysis

TIN-based watershed delineation uses triangle edges as flow pathways, complementing raster-based hydrology.

Bathymetric Survey Interpolation

Single-beam sonar surveys collect scattered depth points. A TIN produces a surface model of the lake or sea floor for charting.

Mining and Earthworks

Mine engineers use TINs of pre-blast and post-blast surfaces to compute volume removed, grade changes, or stockpile sizes.

Aircraft Slope Analysis

Aviation safety uses TIN surfaces of runways and approach paths to detect violations of obstacle limitation surfaces.

Step-by-Step Workflow in gis.tools

  1. Open the Triangulated Irregular Network (TIN) Generator
  2. Drag in a point layer (GeoJSON, Shapefile, KML, or CSV with lat/lon)
  3. Preview the points on the map
  4. Optionally select an elevation attribute to drive Z values
  5. Optionally load a breakline layer for constrained triangulation
  6. Click "Generate TIN"
  7. Inspect the triangle mesh on the map
  8. Export as GeoJSON, KML, or Shapefile

Worked Example

A civil engineer has 3,200 survey points over a proposed building site, each with an elevation attribute. She loads the point GeoJSON into the TIN Generator, picks the Elev_m field as the Z source, and clicks Generate. The output is 6,392 triangles covering the site. She downloads the GeoJSON, opens it in her CAD software to compute a cut-fill volume against the proposed grade, and produces a quantity report for the contractor.

Common Pitfalls and Gotchas

  • Coincident points cause degenerate triangles. Dedupe first with the De-duplication Tool.
  • Collinear inputs: three or more points on a straight line produce flat triangles with zero area.
  • Extreme point distributions can produce very long thin edge triangles at the convex hull. Consider clipping to the convex hull afterwards.
  • CRS choice matters for the visual result β€” triangulations in WGS84 look distorted near the poles. Reproject first.
  • Memory pressure on very large inputs: hundreds of thousands of points produce millions of triangles. Browser memory may become a limit.
  • Missing Z values on some points break surface interpolation. Filter or impute before triangulating.
  • Constrained triangulation may fail if breaklines self-intersect; validate the breakline layer first.
  • Non-convex boundaries are not handled by unconstrained Delaunay; the triangulation fills the convex hull and you need to clip afterwards.

Tips for Best Results

  • Reproject inputs to a local projected CRS before triangulating
  • Dedupe and validate the input point set first
  • For terrain modeling, include breaklines along ridges, streams, and road edges if constrained Delaunay is available
  • Clip the TIN to a study-area polygon with the GIS Clip Tool (Clip Layer by Polygon) to remove spurious outer triangles
  • Pair with the Voronoi Polygons Generator if you need both structures

Comparison with Other GIS Approaches

ArcGIS Pro has dedicated TIN data structures and a Create TIN tool that supports constrained Delaunay with hard and soft breaklines. QGIS offers Triangulation under Processing. GDAL's gdal_grid can produce TIN-based surfaces. PostGIS has ST_DelaunayTriangles. Open-source libraries like CGAL, Triangle, and d3-delaunay are widely used. The browser-based gis.tools TIN Generator is the fastest way to a Delaunay triangulation for exploratory or medium-scale work.

Performance Considerations

Delaunay triangulation is O(n log n) in most implementations and handles hundreds of thousands of points in the browser. The bottleneck is usually exporting or rendering the triangle mesh, not computing it.

Data Privacy and Browser-Based Processing

Survey data, cadastral corner coordinates, and mining point clouds can be confidential. The TIN Generator processes everything in your browser, so nothing is uploaded.

Related GIS Concepts

Triangulated Irregular Network (TIN) is the GIS data structure built from a Delaunay triangulation with Z values per vertex. Voronoi diagram is the geometric dual of the Delaunay triangulation. Natural neighbor interpolation uses Delaunay-based weights to interpolate values at new locations. Alpha shapes extend the Delaunay triangulation to produce concave hulls. Constrained Delaunay triangulation (CDT) forces specific edges to appear in the output.

Frequently Asked Questions

Can I use this as a TIN generator for elevation data?

Yes β€” specify an elevation attribute, and the output carries Z values you can use for surface analysis.

What's the difference between Delaunay and Voronoi?

They are geometric duals. Delaunay triangulates the points; Voronoi partitions the plane into proximity regions.

How many triangles will I get?

For n input points with k convex-hull vertices, the result has 2n βˆ’ 2 βˆ’ k triangles.

Does the tool support breaklines?

Optional constrained-Delaunay mode accepts a breakline layer.

Can I compute contours from the TIN?

Not directly in this tool, but the TIN output is a starting point for contour extraction in downstream software.

Related Tools on gis.tools

100% client-side processing - your data stays private and never leaves your device