Skip to content

VectorFieldSource

Namespace: ThinkGeo.Core

A vector field - wind, current, flow - as a FlowVector per cell of a grid over an extent. Like a GridSource it only carries the data; MapStyle.AddVectorField(VectorFieldSource, VectorFieldStyle) and MapStyle.AddParticleFlow(VectorFieldSource, ParticleFlowStyle) hold how it draws, and VectorFieldSource.SetValues(FlowVector[,]) re-renders without touching the style.

public sealed class VectorFieldSource

Inheritance object → VectorFieldSource

Remarks:

The values are a [row, column] array: row 0 is the extent's north edge, column 0 its west edge, and the array's own size is the grid's.

Properties

ColumnCount

How many cells across, the values array's second dimension.

public int ColumnCount { get; }

Property Value

int

RowCount

How many cells down, the values array's first dimension.

public int RowCount { get; }

Property Value

int

Extent

The ground the field covers, in VectorFieldSource.SourceProjection.

public RectangleShape Extent { get; }

Property Value

RectangleShape

SourceProjection

The coordinate system VectorFieldSource.Extent is stated in, or null when it is the map's. The renderer places the grid on the map through it; the cells' values are not converted.

public Projection SourceProjection { get; }

Property Value

Projection

Item

public FlowVector Item { get; }

Property Value

FlowVector

Constructors

VectorFieldSource(FlowVector[,], RectangleShape, Projection)

public VectorFieldSource(FlowVector[,] values, RectangleShape extent, Projection sourceProjection)

Parameters

values FlowVector[,]
The flow in each cell, [row, column], row 0 on the north edge. The array is handed over.

extent RectangleShape
The ground the field covers, in .

sourceProjection Projection
The coordinate system is in, or null when it is the map's.

Methods

SetValues(FlowVector[,])

Replaces the values - an array the size of the field's - and redraws. The array is handed over.

public void SetValues(FlowVector[,] values)

Parameters

values FlowVector[,]

Returns

void

B()

internal float B()

Returns

float

b()

internal Byte[] b()

Returns

Byte[]