Last updated

API / geotoolkit / contour / grid / ContourTriangularGrid / ContourTriangularGrid

Class: ContourTriangularGrid

grid.ContourTriangularGrid.ContourTriangularGrid

Contour grid built on a set of triangles.

Hierarchy

Table of contents

Constructors
Accessors
Methods

Contents

Constructors

new ContourTriangularGrid()

new ContourTriangularGrid()

Overrides

ContourAbstractGrid.constructor

Accessors

SpaceReserveRatio

Static get SpaceReserveRatio(): number

The space reserve ratio

Returns

number

Inherited from

ContourAbstractGrid.SpaceReserveRatio

Methods

addHoleValue

addHoleValue(holeValue): void

Adds a value that will serve as an indicator for a hole in data grid. It is assumed that grid data may have more than one hole value.

Parameters

Name Type Description
holeValuenumberThe hole value

Returns

void


clear

clear(): void

Removes all grid data

Returns

void


clearGrid

clearGrid(): void

Clears grid data

Returns

void

Overrides

ContourAbstractGrid.clearGrid


convertToSafeFloat64

convertToSafeFloat64(value): number

Converts the value that is not altered when setting to a Float64Array value.

Parameters

Name Type Description
valuenumberThe value that will be converted to a safe double.

Returns

number

safeValue The converted value.

Inherited from

ContourAbstractGrid.convertToSafeFloat64


getBuildRange

getBuildRange(netRange, realRange): void

Gets the build range

Parameters

Name Type Description
netRangeGridRangeThe range for the net
realRangeGridRangeThe range for the data

Returns

void

Overrides

ContourAbstractGrid.getBuildRange


getClassName

getClassName(): string

Returns

string

Inherited from

ContourAbstractGrid.getClassName


getGridToModel

getGridToModel(): Transformation

Gets the grid-to-model transformation

Returns

Transformation

transformation Grid-To-Model transformation

Inherited from

ContourAbstractGrid.getGridToModel


getMaxValue

getMaxValue(): number

Gets the maximum value in the contour grid. If the max value has not been set this method will scan whole grid to find maximum altitude value (but only once, then it will remember it).

Returns

number

max The maximum value

Overrides

ContourAbstractGrid.getMaxValue


getMinValue

getMinValue(): number

Gets the minimum value in the contour grid. If the max value has not been set this method will scan whole grid to find maximum altitude value (but only once, then it will remember it).

Returns

number

max The maximum value

Overrides

ContourAbstractGrid.getMinValue


getModelLimits

getModelLimits(): Rect

Gets the model limits of the data

Returns

Rect

modelLimits The model limits

Overrides

ContourAbstractGrid.getModelLimits


getNumberPoints

getNumberPoints(): number

Gets the number of points

Returns

number

number The number of points


getNumberTriangles

getNumberTriangles(): number

Gets the number of triangles

Returns

number

number The number of triangles


getPointValue

getPointValue(indexPoint): number

Value current altitude values for point

Parameters

Name Type Description
indexPointnumberThe number value point

Returns

number

altitudeValue The altitude value for the point


getPointsX

getPointsX(): Float64Array

Gets the X points.

Returns

Float64Array

xPoints The array of X points.


getPointsY

getPointsY(): Float64Array

Gets the Y points.

Returns

Float64Array

yPoints The array of Y points.


getPointsZ

getPointsZ(): Float64Array

Gets the Z points.

Returns

Float64Array

zPoints The array of Z points.


getRange

getRange(): GridRange

Gets the Grid Range (Reserved. Always returns SetGridRange(0,0,0,0))

Returns

GridRange

gridRange

Overrides

ContourAbstractGrid.getRange


getRemoveDuplicatePoints

getRemoveDuplicatePoints(): boolean

This property gets the duplicates removal mode for the triangular grid. If set to TRUE, then the system will attempt to fix errors in input data. This feature is enabled by default.

Returns

boolean

removeDuplicatePoints If True duplicates will be removed.


getTriangleGrid2ModelTransformation

getTriangleGrid2ModelTransformation(): Transformation

Get grid to model mapping transformation for triangle grid data.

Returns

Transformation

transformation The grid to model transformation


getTrianglesAB

getTrianglesAB(): Int32Array

Gets the array of first point index for triangles

Returns

Int32Array

Triangles AB


getTrianglesBC

getTrianglesBC(): Int32Array

Gets the array of second point index for triangles

Returns

Int32Array

Triangles BC


getTrianglesCA

getTrianglesCA(): Int32Array

Gets the array of third point index for triangles

Returns

Int32Array

Triangles CA


getValueAtModelPoint

getValueAtModelPoint(modelPoint): number

Gets the altitude at the give model point location.

Parameters

Name Type Description
modelPointPointThe model point

Returns

number

modelPoint The model point's value

Overrides

ContourAbstractGrid.getValueAtModelPoint


needRebuild

needRebuild(): boolean

Returns grid rebuild state.

Returns

boolean

needRebuild True if grid is to be rebuilt (data changed)

Overrides

ContourAbstractGrid.needRebuild


setGridToModel

setGridToModel(transformation): void

Sets the grid-to-model transformation

Parameters

Name Type Description
transformationTransformationGrid-To-Model transformation

Returns

void

Inherited from

ContourAbstractGrid.setGridToModel


setMaxValue

setMaxValue(value): ContourTriangularGrid

Sets the maximum value in the contour grid

Parameters

Name Type Description
valuenumberThe new maximum value

Returns

ContourTriangularGrid

this


setMinValue

setMinValue(value): ContourTriangularGrid

Sets the minimum value in the contour grid

Parameters

Name Type Description
valuenumberThe new maximum value

Returns

ContourTriangularGrid

this


setRange

setRange(gridRange): void

Sets the Grid Range (Reserved. Always sets SetGridRange(0,0,0,0))

Parameters

Name Type Description
gridRangeGridRangeThe grid z-value range.

Returns

void

Overrides

ContourAbstractGrid.setRange


setRemoveDuplicatePoints

setRemoveDuplicatePoints(removeDuplicatePoints): ContourTriangularGrid

This property enables/disables duplicates removal from triangular grid. If set to TRUE, then the system will attempt to fix errors in input data. This feature is enabled by default.

Parameters

Name Type Description
removeDuplicatePointsbooleanIf True duplicates will be removed.

Returns

ContourTriangularGrid

this


setTrianglesAdvanced

setTrianglesAdvanced(pointsX, pointsY, pointsZ, nPoints, edgesPoint1, edgesPoint2, nEdges, trianglesEdgeAB, trianglesEdgeBC, trianglesEdgeCA, nTriangles, defaultBorder, borderEdges, nBorderEdges): ContourTriangularGrid

Sets data for grid. This is the more complicated method of two setTriangles but is faster and has more advanced border visualization handling.

Parameters

Name Type Description
pointsXnumber[] | Float64Arrayarray of x-coordinates for points.
pointsYnumber[] | Float64Arrayarray of y-coordinates for points.
pointsZnumber[] | Float64Arrayarray of altitude values for points.
nPointsnumberThe number of points.
edgesPoint1number[] | Int32ArrayArray of first point index for edges.
edgesPoint2number[] | Int32ArrayArray of second point index for edges.
nEdgesnumberThe number of edges.
trianglesEdgeABnumber[] | Int32ArrayArray of first edge index for triangles.
trianglesEdgeBCnumber[] | Int32ArrayArray of second edge index for triangles.
trianglesEdgeCAnumber[] | Int32ArrayArray of third edge index for triangles.
nTrianglesnumberThe number of triangles.
defaultBorderbooleanThe default border.
borderEdgesInt32ArrayThe border edges (can be null).
nBorderEdgesnumberThe number of border edges.

Returns

ContourTriangularGrid

this


setTrianglesSimple

setTrianglesSimple(pointsX, pointsY, pointsZ, nPoints, trianglesPointsA, trianglesPointsB, trianglesPointsC, nTriangles, defaultBorder): ContourTriangularGrid

Sets data for grid.

Parameters

Name Type Description
pointsXnumber[] | Float64Arrayarray of x-coordinates for points.
pointsYnumber[] | Float64Arrayarray of y-coordinates for points.
pointsZnumber[] | Float64Arrayarray of altitude values for points.
nPointsnumberThe number of points.
trianglesPointsAnumber[] | Int32ArrayArray of first point index for triangles.
trianglesPointsBnumber[] | Int32ArrayArray of second point index for triangles.
trianglesPointsCnumber[] | Int32ArrayArray of third point index for triangles.
nTrianglesnumberThe number of triangles.
defaultBorderbooleanif true, all edges that belong to only one triangle are included into contour border for visualization

Returns

ContourTriangularGrid

this


getClassName

Static getClassName(): string

Returns

string

Inherited from

ContourAbstractGrid.getClassName