Table of Contents

Class IsolineTracer

Namespace
EncDotNet.S100.Pipelines.Coverage
Assembly
EncDotNet.S100.Core.dll

Traces isolines through a regular grid of values with marching squares. Nodes holding the no-data value break the lines: a cell with any no-data corner contributes nothing.

public static class IsolineTracer
Inheritance
IsolineTracer
Inherited Members

Remarks

A coarse grid gives angular lines, so the grid is first subdivided with bilinear interpolation until it is at least TargetNodes nodes along its longer side (at most MaxSubdivision times). Saddle cells are resolved with the cell-centre average.

Fields

MaxSubdivision

The largest subdivision factor.

public const int MaxSubdivision = 8

Field Value

int

TargetNodes

The node count along the longer side the subdivision aims for.

public const int TargetNodes = 64

Field Value

int

Methods

Trace(float[], int, int, float, IReadOnlyList<double>)

Traces each of levels through values.

public static IReadOnlyList<TracedIsoline> Trace(float[] values, int rows, int columns, float noData, IReadOnlyList<double> levels)

Parameters

values float[]

Row-major values, rows × columns.

rows int

Number of rows.

columns int

Number of columns.

noData float

The no-data value; NaN is always no-data.

levels IReadOnlyList<double>

The levels to trace.

Returns

IReadOnlyList<TracedIsoline>

The isolines, one or more per level that crosses the grid.