Table of Contents

Class GridFeatureLayer

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

This class uses the grid file provided.

public class GridFeatureLayer : FeatureLayer
Inheritance
GridFeatureLayer
Inherited Members

Constructors

GridFeatureLayer()

This is the default constructor for the class.

public GridFeatureLayer()

Remarks

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

GridFeatureLayer(string)

This is a constructor for the class.

public GridFeatureLayer(string gridPathFilename)

Parameters

gridPathFilename string

This parameter is the path and filename of the grid file you want to use.

Remarks

This constructor gets the layer ready to use.

Properties

CellSize

Gets the cell size from the grid.

public double CellSize { get; }

Property Value

double

DataValueColumnName

public string DataValueColumnName { get; }

Property Value

string

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

NumberOfColumns

Gets the column number from the grid.

public int NumberOfColumns { get; }

Property Value

int

NumberOfRows

Gets the row number from the grid.

public int NumberOfRows { get; }

Property Value

int

PathFilename

This property gets and sets the path and filename to the grid file you want to use.

public string PathFilename { get; set; }

Property Value

string

Remarks

This should be the complete path and filename of a grid file.

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.

Events

StreamLoading

Occurs when [stream loading].

public event EventHandler<StreamLoadingEventArgs> StreamLoading

Event Type

EventHandler<StreamLoadingEventArgs>