CreateTriangulation()
Summary
Creates a Triangulated Irregular Network (TIN).
Syntax
tin = CreateTriangulation(string layer_set_name, array options)
| Argument | Contents |
|---|---|
| Layer_set_name | The name of the point layer and set to use to create the TIN, separated by a vertical bar |
| Option | Type | Contents |
|---|---|---|
| Smooth | Integer | Smoothing level 1-3, or 0 for no smoothing |
| Field | String | The field to use for the elevation |
| Units | String | Elevation units that the field values are in (e.g. "meters" or "feet." Defaults to map units). |
Returns
A TIN.
Notes
-
If you are using all records, omit the vertical bar in set_name.
-
CreateTriangulation() displays a progress bar. To add a Cancel button to the progress bar, precede the function call with an "on escape" clause. For more information, see Error Handling.
-
The triangulation will store elevations in the units of the field values.
Example
// Open Elevdata.cdf in the Tutorial folder
layer_name = GetLayer()
point_tin = CreateTriangulation(layer_name + "|", {{"Field","Elevation"}})
folder = RunMacro("G30 Tutorial Folder")
CreateContourDB(point_tin, folder + "contours.dbd",
{{"Automatic", 10},{"Layer Name","Elevation Contours"}})
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The current layer is not a point layer, or the options are not of the required type, or the field containing the elevations has identical values for every record |
| Escape | The user clicked Cancel |
See Also
| Function | Summary |
|---|---|
| CreateContourDB() | Creates a line or area geographic file of the contours derived from a TIN |
| CreateHullDB() | Creates an area or a line DBD database based on a TIN |
| CreateTriangulationAreaDB() | Creates an area geographic file from the facets in a TIN, with slope and aspect values |
| CreateVisibilityMap() | Creates an area geographic file from a TIN to show the area that is visible from a certain height at a viewpoint |
| EstimateElevation() | Calculates a spot elevation using a TIN |
| TINElevations() | Gets the minimum and maximum elevations in a TIN |
| TINScope() | Gets the scope for a TIN |