Table of Contents

Class InMemoryGridFeatureLayer

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

This class uses the grid file provided.

public class InMemoryGridFeatureLayer : FeatureLayer
Inheritance
InMemoryGridFeatureLayer
Inherited Members

Constructors

InMemoryGridFeatureLayer()

This is the default constructor for the class.

public InMemoryGridFeatureLayer()

Remarks

This is the default constructor. If you use this constructor, then you need to set the required properties manually.

InMemoryGridFeatureLayer(GridCell[,])

public InMemoryGridFeatureLayer(GridCell[,] gridMatrix)

Parameters

gridMatrix GridCell[,]

Properties

CellSize

Gets the cell size from the grid.

public double CellSize { get; }

Property Value

double

ColumnCount

Gets the column number from the grid.

public int ColumnCount { get; }

Property Value

int

DataValueColumnName

public string DataValueColumnName { get; }

Property Value

string

GridMatrix

public GridCell[,] GridMatrix { get; set; }

Property Value

GridCell[,]

HasBoundingBox

This property checks to see if a Layer has a BoundingBox or not. If it has no BoundingBox, it will throw an exception when you call the GetBoundingBox() and GetFullExtent() APIs. In GridFeatureLayer, we override this API and mark it as true.

public override bool HasBoundingBox { get; }

Property Value

bool

Remarks

The default implementation in the base class returns false.

NoDataValue

Gets the NoDataValue from the grid.

public double NoDataValue { get; }

Property Value

double

RowCount

Gets the row number from the grid.

public int RowCount { get; }

Property Value

int

Methods

GenerateGrid(GridDefinition, GridInterpolationModel, Stream, Func<double, string>)

public static void GenerateGrid(GridDefinition gridDefinition, GridInterpolationModel gridInterpolationModel, Stream outputStream, Func<double, string> cellValueToStringFunc = null)

Parameters

gridDefinition GridDefinition
gridInterpolationModel GridInterpolationModel
outputStream Stream
cellValueToStringFunc Func<double, string>

GenerateGridMatrix()

public GridCell[,] GenerateGridMatrix()

Returns

GridCell[,]

GenerateGridMatrix(GridDefinition, GridInterpolationModel)

public static GridCell[,] GenerateGridMatrix(GridDefinition gridDefinition, GridInterpolationModel gridInterpolationModel)

Parameters

gridDefinition GridDefinition
gridInterpolationModel GridInterpolationModel

Returns

GridCell[,]

GetBoundingBoxCore()

This method returns the bounding box of the FeatureLayer.

protected override RectangleShape GetBoundingBoxCore()

Returns

RectangleShape

This method returns the bounding box of the FeatureLayer.

Remarks

This method is called from the concrete public method GetBoundingBox. It returns the bounding box of the FeatureLayer.

Exceptions

InvalidOperationException

In the event you attempt to call this method on a FeatureLayer which has not been opened, it will throw an InvalidOperationException.