Class Matrix
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
stringThis parameter specified the id of the Matrix.
cellWidth
doubleThis parameter specified the cell width(in DecimalDegrees) of the Matrix.
cellHeight
doubleThis parameter specified the cell height(in DecimalDegrees) of the Matrix.
boundingBox
RectangleShapeThis 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
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
CellWidth
This property gets the cell width of the Matrix.
public double CellWidth { get; set; }
Property Value
Id
This property gets or sets the id of the Matrix.
public string Id { get; set; }
Property Value
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
longThis parameter specifies the row based on 1.
column
longThis 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
PointShapeThe 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
GetColumnIndex(PointShape)
Get the column index by passing a specified point shape location.
public long GetColumnIndex(PointShape intersectingPoint)
Parameters
intersectingPoint
PointShapeThe 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
RectangleShapeThis 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
RectangleShapeThis 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
RectangleShapeThis 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
RectangleShapeThis 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
RectangleShapeisContains
bool
Returns
GetRowCount()
This method gets the row count of the Matrix.
public long GetRowCount()
Returns
GetRowIndex(PointShape)
Get the row index by passing a specified point shape location.
public long GetRowIndex(PointShape intersectingPoint)
Parameters
intersectingPoint
PointShapeThe parameter specified the target point location.
Returns
- long
The returning row index by specifying the target point location.