Table of Contents

Class Matrix

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

This class represents a base Matrix which encapsulate the tileView calculation logic.

public abstract class Matrix
Inheritance
Matrix
Derived
Inherited Members

Remarks

This class is abstract and designed to be inherited to create your own TileMatrix. The derived TileMatrix classes are typically used on a TileMatrixSet.

Constructors

Matrix()

This method is the default protected constructor.

protected Matrix()

Remarks

If you use this constructor, you have to set the properties correctly before use it.

Matrix(string, double, double, RectangleShape)

This method is the default protected constructor.

protected Matrix(string id, double cellWidth, double cellHeight, RectangleShape boundingBox)

Parameters

id string

This parameter specified the id of the Matrix.

cellWidth double

This parameter specified the cell width(in DecimalDegrees) of the Matrix.

cellHeight double

This parameter specified the cell height(in DecimalDegrees) of the Matrix.

boundingBox RectangleShape

This parameter specified the boundingBox of the Matrix.

Remarks

None

Properties

BoundingBox

This property gets or sets the BoundingBox of the Matrix.

public RectangleShape BoundingBox { get; set; }

Property Value

RectangleShape

Remarks

The bounding box of the Matrix is related with the referencePoint, cellWidth, cellHeight and the rowCount and columnCount.

CellHeight

This property gets the cell height of the Matrix.

public double CellHeight { get; set; }

Property Value

double

CellWidth

This property gets the cell width of the Matrix.

public double CellWidth { get; set; }

Property Value

double

Id

This property gets or sets the id of the Matrix.

public string Id { get; set; }

Property Value

string

Methods

GetAllCells()

This method returns all the cells of the TileMatrix.

public Collection<MatrixCell> GetAllCells()

Returns

Collection<MatrixCell>

This method returns a collection of MatrixCell.

Exceptions

InvalidOperationException

The InvalidOperationException will be thrown if too many cells(greater than maximumCellCount) are need to returned back.

GetCell(long, long)

Get the cell by passing a specified row and column.

public MatrixCell GetCell(long row, long column)

Parameters

row long

This parameter specifies the row based on 1.

column long

This parameter specifies the row based on 1.

Returns

MatrixCell

The returning cell by specified the row and column.

GetCell(PointShape)

Get the cell by passing a specified point shape location.

public MatrixCell GetCell(PointShape intersectingPoint)

Parameters

intersectingPoint PointShape

The parameter specified the target point location.

Returns

MatrixCell

The returning cell by specifying the target point location.

GetColumnCount()

This method gets the column count of the Matrix.

public long GetColumnCount()

Returns

long

GetColumnIndex(PointShape)

Get the column index by passing a specified point shape location.

public long GetColumnIndex(PointShape intersectingPoint)

Parameters

intersectingPoint PointShape

The parameter specified the target point location.

Returns

long

The returning column index by specifying the target point location.

GetContainedCells(RectangleShape)

This method returns the contained cells of the TileMatrix.

public Collection<MatrixCell> GetContainedCells(RectangleShape worldExtent)

Parameters

worldExtent RectangleShape

This parameter specifies extent which is used to get the tiles back from.

Returns

Collection<MatrixCell>

This method returns a collection of MatrixCell which contained in the passed in extent.

Exceptions

InvalidOperationException

The InvalidOperationException will be thrown if too many cells(greater than maximumCellCount) are need to returned back.

GetContainedRowColumnRange(RectangleShape)

This method returns the RowColumnRange of the TileMatrix contained the passed in extent.

public RowColumnRange GetContainedRowColumnRange(RectangleShape worldExtent)

Parameters

worldExtent RectangleShape

This parameter specifies extent which is used to get the tiles back from.

Returns

RowColumnRange

This method returns the RowColumnRange contained the passed in extent.

GetIntersectingCells(RectangleShape)

This method returns the intersecting cells of the TileMatrix.

public Collection<MatrixCell> GetIntersectingCells(RectangleShape worldExtent)

Parameters

worldExtent RectangleShape

This parameter specifies extent which is used to get the tiles back from.

Returns

Collection<MatrixCell>

This method returns a collection of MatrixCell which intersecting with the passed in extent.

Exceptions

InvalidOperationException

The InvalidOperationException will be thrown if too many cells(greater than maximumCellCount) are need to returned back.

GetIntersectingRowColumnRange(RectangleShape)

This method returns the RowColumnRange of the TileMatrix intersects the passed in extent.

public RowColumnRange GetIntersectingRowColumnRange(RectangleShape worldExtent)

Parameters

worldExtent RectangleShape

This parameter specifies extent which is used to get the tiles back from.

Returns

RowColumnRange

This method returns the RowColumnRange intersects the passed in extent.

GetRowColumnRangeCore(RectangleShape, bool)

protected virtual RowColumnRange GetRowColumnRangeCore(RectangleShape worldExtent, bool isContains)

Parameters

worldExtent RectangleShape
isContains bool

Returns

RowColumnRange

GetRowCount()

This method gets the row count of the Matrix.

public long GetRowCount()

Returns

long

GetRowIndex(PointShape)

Get the row index by passing a specified point shape location.

public long GetRowIndex(PointShape intersectingPoint)

Parameters

intersectingPoint PointShape

The parameter specified the target point location.

Returns

long

The returning row index by specifying the target point location.