Skip to content

Matrix

Namespace: ThinkGeo.Core

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

public abstract class Matrix

Inheritance ObjectMatrix

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.

Properties

CellWidth

This property gets the cell width of the Matrix.

public double CellWidth { get; set; }

Property Value

Double

CellHeight

This property gets the cell height of the Matrix.

public double CellHeight { get; set; }

Property Value

Double

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.

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(Int64, Int64)

Get the cell by passing a specified row and column.

public MatrixCell GetCell(long row, long column)

Parameters

row Int64
This parameter specifies the row based on 1.

column Int64
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.

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

Int64
The returning row index by specifying the target point location.

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

Int64
The returning column index by specifying the target point location.

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.

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.

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.

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.

GetRowCount()

This method gets the row count of the Matrix.

public long GetRowCount()

Returns

Int64

GetColumnCount()

This method gets the column count of the Matrix.

public long GetColumnCount()

Returns

Int64

GetRowColumnRangeCore(RectangleShape, Boolean)

protected RowColumnRange GetRowColumnRangeCore(RectangleShape worldExtent, bool isContains)

Parameters

worldExtent RectangleShape

isContains Boolean

Returns

RowColumnRange

GetRowColumnRange(RectangleShape, Boolean, Double, Boolean)

internal RowColumnRange GetRowColumnRange(RectangleShape worldExtent, bool isContains, double epsilon, bool wrapWorldExtent)

Parameters

worldExtent RectangleShape

isContains Boolean

epsilon Double

wrapWorldExtent Boolean

Returns

RowColumnRange