The grid object is used to represent a grid which can be added to the map. More...
Public Member Functions | |
| bool | AssignNewProjection (string Projection) |
| Assign new projection to the grid. | |
| void | CellToProj (int Column, int Row, out double x, out double y) |
| Uses a cell's column and row position to find the center of the cell in projected map coordinates. | |
| bool | Clear (object ClearValue) |
| Clears all data in the grid, setting the value of all cells in the grid to the specified clear value. | |
| bool | Close () |
| Closes the grid. | |
| bool | CreateNew (string Filename, GridHeader Header, GridDataType DataType, object InitialValue, bool InRam, GridFileType fileType, ICallback cBack) |
| Creates a new grid. | |
| string | get_ErrorMsg (int ErrorCode) |
| Retrieves the error message associated with the specified error code. | |
| object | get_Value (int Column, int Row) |
| Returns the value stored in the grid at the specified cell. | |
| bool | GetFloatWindow (int StartRow, int EndRow, int StartCol, int EndCol, ref float Vals) |
| Returns an array with grid values which lie within specified bounds. | |
| bool | GetRow (int Row, ref float Vals) |
| The faster way to read the array values that are of a specific size. | |
| bool | Open (string Filename, GridDataType DataType, bool InRam, GridFileType fileType, ICallback cBack) |
| Opens a grid. | |
| void | ProjToCell (double x, double y, out int Column, out int Row) |
| Converts a point in projected map coordinates to a cell (column, row) in the grid. | |
| bool | PutFloatWindow (int StartRow, int EndRow, int StartCol, int EndCol, ref float Vals) |
| Sets an array of values for a given region of the grid. | |
| bool | PutRow (int Row, ref float Vals) |
| bool | Resource (string newSrcPath) |
| Changes the grid source without closing it. | |
| bool | Save (string Filename, GridFileType GridFileType, ICallback cBack) |
| Saves the grid. | |
| void | set_Value (int Column, int Row, object pVal) |
| Sets the value of the specified cell of the grid. | |
| bool | SetInvalidValuesToNodata (double MinThresholdValue, double MaxThresholdValue) |
| Sets invalid values to no data values. | |
Properties | |
| string | CdlgFilter [get] |
| Returns the common dialog filter containing all supported file extensions in string format. | |
| GridDataType | DataType [get] |
| Returns the data type of the values stored in the grid. | |
| string | Filename [get] |
| The filename associated with the object. | |
| ICallback | GlobalCallback [get, set] |
| The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications. | |
| GridHeader | Header [get] |
| Returns the header of the grid. | |
| bool | InRam [get] |
| Returns whether the grid is loaded in to RAM memory or not. | |
| string | Key [get, set] |
| The key may be used by the programmer to store any string data associated with the object. | |
| int | LastErrorCode [get] |
| Retrieves the last error generated in the object. | |
| object | Maximum [get] |
| Returns the maximum value stored in the grid. | |
| object | Minimum [get] |
| Returns the minimum value stored in the grid. | |
| GridColorScheme | RasterColorTableColoringScheme [get] |
| Gets grid color scheme object used for rendering of the image represenation of the grid. | |
The grid object is used to represent a grid which can be added to the map.
| bool Grid.AssignNewProjection | ( | string | Projection | ) |
Assign new projection to the grid.
| Projection | Projection string in proj4 format. |
| void Grid.CellToProj | ( | int | Column, |
| int | Row, | ||
| out double | x, | ||
| out double | y | ||
| ) |
Uses a cell's column and row position to find the center of the cell in projected map coordinates.
| Column | The column of the cell to find the center in projected map coordinates. |
| Row | The row of the cell to find the center in projected map coordinates. |
| x | Returns the x projected map coordinate of the center of the specified cell. |
| y | Returns the yprojected map coordinate of the center of the specified cell. |
| bool Grid.Clear | ( | object | ClearValue | ) |
Clears all data in the grid, setting the value of all cells in the grid to the specified clear value.
| ClearValue | The value to set all of the grid's cells to. |
| bool Grid.Close | ( | ) |
Closes the grid.
| bool Grid.CreateNew | ( | string | Filename, |
| GridHeader | Header, | ||
| GridDataType | DataType, | ||
| object | InitialValue, | ||
| bool | InRam, | ||
| GridFileType | fileType, | ||
| ICallback | cBack | ||
| ) |
Creates a new grid.
| Filename | The filename for the new grid. |
| Header | The header defining the attributes of the new grid. |
| DataType | The data type of the new grid. |
| InitialValue | The initial value for each cell of the new grid. |
| InRam | Optional. A boolean value representing the grid being stored in memory(RAM) when True, and the grid being stored on disk when False. |
| fileType | Optional. The grid file type. |
| cBack | Optional. The ICallback object that will receive the progress and error events during the creation of the new grid. |
| string Grid.get_ErrorMsg | ( | int | ErrorCode | ) |
Retrieves the error message associated with the specified error code.
| ErrorCode | The numeric code of error returned by Grid.LastErrorCode. |
| object Grid.get_Value | ( | int | Column, |
| int | Row | ||
| ) |
Returns the value stored in the grid at the specified cell.
| Column | The column representing the cell for which the value is required. |
| Row | The row representing the cell for which the value is required. |
| bool Grid.GetFloatWindow | ( | int | StartRow, |
| int | EndRow, | ||
| int | StartCol, | ||
| int | EndCol, | ||
| ref float | Vals | ||
| ) |
Returns an array with grid values which lie within specified bounds.
For inner use or C++ use only. Only a single value will be returned TO .NET.
| StartRow | The start row of the window. |
| EndRow | The end rw of the window. |
| StartCol | The start color of the window. |
| EndCol | The end color of the window. |
| Vals | A supposed array (only a single value in .NET). |
| bool Grid.GetRow | ( | int | Row, |
| ref float | Vals | ||
| ) |
The faster way to read the array values that are of a specific size.
The row is the integer row to read from the grid object. The vals variable is actually the first element of the array of floats that you want to be populated with the values from the grid. Since arrays are stored sequentially in memory, passing the first element allows the prediction of where the other values must go. It is very important that you always dimension the array as being of type float, and always make sure that you dimension it from 0 to numCols - 1.
| Row | The Integer value of the row to retrieve values for. |
| Vals | Reference to the first element of the array of floats that will hold the row of values. |
| bool Grid.Open | ( | string | Filename, |
| GridDataType | DataType, | ||
| bool | InRam, | ||
| GridFileType | fileType, | ||
| ICallback | cBack | ||
| ) |
Opens a grid.
| Filename | The filename of the grid to be opened. |
| DataType | Optional. The data type of the grid to be opened. |
| InRam | Optional. A boolean value representing whether the grid will be stored in RAM or on disk. |
| fileType | Optional. The file type of the grid. The default file type is "Use Extension". |
| cBack | Optional. The ICallback object that will receive the progress and error events during the creation of the new grid. |
| void Grid.ProjToCell | ( | double | x, |
| double | y, | ||
| out int | Column, | ||
| out int | Row | ||
| ) |
Converts a point in projected map coordinates to a cell (column, row) in the grid.
If the point lies outside the bounds of the grid, a column and row are returned which are outside the boundaries of the grid. For example, if the point lies to the left or lies below the grid boundaries, a negative column or row will be returned. Similarly, if the point lies above or to the right of the grid boundaries, a column or row which is greater than the number of columns or rows will be returned.
| x | The x projected map coordinate for which the corresponding cell in the grid is required. |
| y | The y projected map coordinate for which the corresponding cell in the grid is required. |
| Column | The column the specified point lies within. This value may not be within the valid bounds of the grid. |
| Row | The row the specified point lies within. This value may not be within the valid bounds of the grid. |
| bool Grid.PutFloatWindow | ( | int | StartRow, |
| int | EndRow, | ||
| int | StartCol, | ||
| int | EndCol, | ||
| ref float | Vals | ||
| ) |
Sets an array of values for a given region of the grid.
| StartRow | The start row of the window. |
| EndRow | The end rw of the window. |
| StartCol | The start color of the window. |
| EndCol | The end color of the window. |
| Vals | A supposed array (only a single value in .NET). |
| bool Grid.PutRow | ( | int | Row, |
| ref float | Vals | ||
| ) |
The faster way to write the array values that are of a specific size. The row is the integer row to read from the grid object. The vals variable is actually the first element of the array of floats that you want to be populated with the values from the grid. Since arrays are stored sequentially in memory, passing the first element allows the prediction of where the other values must go. It is very important that you always dimension the array as being of type float, and always make sure that you dimension it from 0 to numCols - 1.
| Row | The Integer value of the row to retrieve values for. |
| Vals | Reference to the first element of the array of floats that will hold the row of values. |
| bool Grid.Resource | ( | string | newSrcPath | ) |
Changes the grid source without closing it.
| newSrcPath | The name of the new file source. |
| bool Grid.Save | ( | string | Filename, |
| GridFileType | GridFileType, | ||
| ICallback | cBack | ||
| ) |
Saves the grid.
| Filename | Optional. The filename the grid will be saved under. If no filename is specified the filename in the grid's Filename property is used. |
| GridFileType | Optional. The file type to save the grid as. If no type is specified, the type stored in the grid object is used. |
| cBack | Optional. The ICallback object that will receive the progress and error events during the creation of the new grid. |
| void Grid.set_Value | ( | int | Column, |
| int | Row, | ||
| object | pVal | ||
| ) |
Sets the value of the specified cell of the grid.
| Column | The index of the cell's column. |
| Row | The index of the cell's row. |
| pVal | The new value as variant data type. |
| bool Grid.SetInvalidValuesToNodata | ( | double | MinThresholdValue, |
| double | MaxThresholdValue | ||
| ) |
Sets invalid values to no data values.
| MinThresholdValue | The minimum valid value. |
| MaxThresholdValue | The maximum valid value. |
string Grid.CdlgFilter [get] |
Returns the common dialog filter containing all supported file extensions in string format.
GridDataType Grid.DataType [get] |
Returns the data type of the values stored in the grid.
string Grid.Filename [get] |
The filename associated with the object.
ICallback Grid.GlobalCallback [get, set] |
The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
GridHeader Grid.Header [get] |
Returns the header of the grid.
bool Grid.InRam [get] |
Returns whether the grid is loaded in to RAM memory or not.
string Grid.Key [get, set] |
The key may be used by the programmer to store any string data associated with the object.
int Grid.LastErrorCode [get] |
Retrieves the last error generated in the object.
object Grid.Maximum [get] |
Returns the maximum value stored in the grid.
object Grid.Minimum [get] |
Returns the minimum value stored in the grid.
Gets grid color scheme object used for rendering of the image represenation of the grid.
1.7.6.1