Tin Class Reference

Represents a triangulated irregular network which may be displayed in the map. More...

Collaboration diagram for Tin:
Collaboration graph

Public Member Functions

bool Close ()
 Closes the TIN. More...
 
bool CreateNew (Grid Grid, double Deviation, SplitMethod SplitTest, double STParam, int MeshDivisions, int MaximumTriangles, ICallback cBack)
 Creates a new TIN object from the specified grid. More...
 
bool CreateTinFromPoints (Array Points)
 Creates a TIN from the array of points. More...
 
string get_ErrorMsg (int ErrorCode)
 Retrieves the error message associated with the specified error code. More...
 
bool get_IsNDTriangle (int TriIndex)
 Gets whether or not a triangle is a no-data triangle. More...
 
void Max (out double x, out double y, out double Z)
 Gets the maximum x, y, and z values of the TIN's extents. More...
 
void max (out double x, out double y, out double Z)
 
void Min (out double x, out double y, out double Z)
 Gets the minimum x, y, and z values of the TIN's extents. More...
 
void min (out double x, out double y, out double Z)
 
bool Open (string TinFile, ICallback cBack)
 Opens a TIN from the specified file. More...
 
bool Save (string TinFilename, ICallback cBack)
 Saves the TIN object under the specified filename. More...
 
bool Select (ref int TriangleHint, double x, double y, out double Z)
 Checks if there is a triangle in the TIN at the specified x and y coordinate. More...
 
void Triangle (int TriIndex, out int vtx1Index, out int vtx2Index, out int vtx3Index)
 Gets the vertex indices of the specified triangle in the TIN. More...
 
void TriangleNeighbors (int TriIndex, ref int triIndex1, ref int triIndex2, ref int triIndex3)
 Gets the indices of the specified triangle's neighboring triangles in the TIN. More...
 
void Vertex (int VtxIndex, out double x, out double y, out double Z)
 Gets the x, y, and Z projected map coordinates of the specified vertex in the TIN. More...
 

Properties

string CdlgFilter [get]
 The string for common open dialog for filtering files which may be used as a source for TIN (*.tin). More...
 
string Filename [get]
 The filename associated with the object. More...
 
ICallback GlobalCallback [get, set]
 The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications. More...
 
string Key [get, set]
 The key may be used by the programmer to store any string data associated with the object. More...
 
int LastErrorCode [get]
 
int NumTriangles [get]
 Returns the number of the triangles in the TIN. More...
 
int NumVertices [get]
 Returns the number of the vertices in the TIN. More...
 

Detailed Description

Represents a triangulated irregular network which may be displayed in the map.

A tin may be created from a grid, or opened from file.

Member Function Documentation

◆ Close()

bool Tin.Close ( )

Closes the TIN.

Returns
A boolean value representing the success or failure of closing the TIN.

◆ CreateNew()

bool Tin.CreateNew ( Grid  Grid,
double  Deviation,
SplitMethod  SplitTest,
double  STParam,
int  MeshDivisions,
int  MaximumTriangles,
ICallback  cBack 
)

Creates a new TIN object from the specified grid.

Parameters
GridThe grid to be used to create the new TIN.
DeviationIf the distance between the grid elevation and the triangle surface elevation at any given point is greater than this value, the triangle will be split at this location. This value is in projected map coordinates.
SplitTestThe method to use when splitting triangles.
STParamSplit Test Parameter. This value depends on the SplitMethod specified. It will either be the smallest inscribed radius allowed measured in projected map coordinates, or it will be the /// smallest angle allowed measured in degrees.
MeshDivisionsThis is the number of dividers used to create an initial mesh for the algorithm. Each cell in the initial mesh is subdivided into smaller triangles depending on the deviation within the cell.
MaximumTrianglesOptional. The maximum number of triangles allowed in the TIN. The default value is 1073741824.
cBackOptional. The ICallback object which will receive progress and error messages while the TIN is being created.
Returns
A boolean value representing the success or failure of creating the new TIN.

◆ CreateTinFromPoints()

bool Tin.CreateTinFromPoints ( Array  Points)

Creates a TIN from the array of points.

Parameters
PointsAn array of Point type.
Returns
True on success and false otherwise.

◆ get_ErrorMsg()

string Tin.get_ErrorMsg ( int  ErrorCode)

Retrieves the error message associated with the specified error code.

Parameters
ErrorCode
Returns

◆ get_IsNDTriangle()

bool Tin.get_IsNDTriangle ( int  TriIndex)

Gets whether or not a triangle is a no-data triangle.

Parameters
TriIndexThe index of the triangle to be tested whether or not it is a no-data triangle.
Returns
A boolean value representing whether or not the triangle is a no-data triangle.

◆ Max()

void Tin.Max ( out double  x,
out double  y,
out double  Z 
)

Gets the maximum x, y, and z values of the TIN's extents.

Parameters
xReturns the maximum x value of the TIN's extents.
yReturns the maximum y value of the TIN's extents.
ZReturns the maximum Z value of the TIN's extents.

◆ max()

void Tin.max ( out double  x,
out double  y,
out double  Z 
)

◆ Min()

void Tin.Min ( out double  x,
out double  y,
out double  Z 
)

Gets the minimum x, y, and z values of the TIN's extents.

Parameters
xReturns the minimum x value of the TIN's extents.
yReturns the minimum y value of the TIN's extents
ZReturns the minimum Z value of the TIN's extents.

◆ min()

void Tin.min ( out double  x,
out double  y,
out double  Z 
)

◆ Open()

bool Tin.Open ( string  TinFile,
ICallback  cBack 
)

Opens a TIN from the specified file.

Parameters
TinFileThe filename of the TIN to be opened.
cBack.Optional. The ICallback object which will receive progress and error messages while the TIN is being opened.
Returns
A boolean value representing the success or failure of opening the TIN.

◆ Save()

bool Tin.Save ( string  TinFilename,
ICallback  cBack 
)

Saves the TIN object under the specified filename.

Parameters
TinFilenameThe filename to be used to save the TIN.
cBackOptional. The ICallback object which will receive progress and error messages while the TIN is being saved.
Returns
A boolean value representing the success or failure of saving the TIN.

◆ Select()

bool Tin.Select ( ref int  TriangleHint,
double  x,
double  y,
out double  Z 
)

Checks if there is a triangle in the TIN at the specified x and y coordinate.

The index of any triangle at that location is returned through TriangleHint, and the z coordinate for the triangle surface at the specified location is returned through Z.

Parameters
TriangleHintThe index of the triangle to start the search with. If the triangle hint is a good guess, the search can be much faster.
xThe x projected map coordinate of the point that is being used to test if it lies within a TIN triangle.
yThe y projected map coordinate of the point that is being used to test if it lies within a TIN triangle.
ZThe z projected map coordinate of the selected triangle's surface will be returned by this parameter.
Returns

◆ Triangle()

void Tin.Triangle ( int  TriIndex,
out int  vtx1Index,
out int  vtx2Index,
out int  vtx3Index 
)

Gets the vertex indices of the specified triangle in the TIN.

Parameters
TriIndexThe index of the triangle in the TIN for which the vertex indices are required.
vtx1IndexThe index of the first vertex in the specified triangle in the TIN.
vtx2IndexThe index of the second vertex in the specified triangle in the TIN.
vtx3IndexThe index of the third vertex in the specified triangle in the TIN.

◆ TriangleNeighbors()

void Tin.TriangleNeighbors ( int  TriIndex,
ref int  triIndex1,
ref int  triIndex2,
ref int  triIndex3 
)

Gets the indices of the specified triangle's neighboring triangles in the TIN.

Parameters
TriIndexThe index of the triangle to get the neighbors of in the TIN.
triIndex1The index of the first neighbor the specified triangle.
triIndex2The index of the second neighbor the specified triangle.
triIndex3The index of the third neighbor the specified triangle.

◆ Vertex()

void Tin.Vertex ( int  VtxIndex,
out double  x,
out double  y,
out double  Z 
)

Gets the x, y, and Z projected map coordinates of the specified vertex in the TIN.

Parameters
VtxIndexThe index of the vertex for which the x, y, and Z coordinates are required.
xReturns the x projected map coordinate of the specified vertex in the TIN.
yReturns the x projected map coordinate of the specified vertex in the TIN.
ZReturns the x projected map coordinate of the specified vertex in the TIN.

Property Documentation

◆ CdlgFilter

string Tin.CdlgFilter
get

The string for common open dialog for filtering files which may be used as a source for TIN (*.tin).

◆ Filename

string Tin.Filename
get

The filename associated with the object.

◆ GlobalCallback

ICallback Tin.GlobalCallback
getset

The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.

◆ Key

string Tin.Key
getset

The key may be used by the programmer to store any string data associated with the object.

◆ LastErrorCode

int Tin.LastErrorCode
get

◆ NumTriangles

int Tin.NumTriangles
get

Returns the number of the triangles in the TIN.

◆ NumVertices

int Tin.NumVertices
get

Returns the number of the vertices in the TIN.