GridReprojector Class |
Both source and target grids are regular in each their coordinate system. However, the source grid may not be a regular grid in the target coordinate system, so re-gridding and interpolation is necessary.
This class is intended for reuse, i.e. reprojection weights are stored and if executing the Convert(Single, Single, Single, Single) method more than once, the stored reprojection values are reused. This is for performance reasons, since the actual reprojection can be an expensive operation.
Namespace: DHI.Projections
The GridReprojector type exposes the following members.
Name | Description | |
---|---|---|
GridReprojector |
Create a new object
|
Name | Description | |
---|---|---|
DoInterpolate |
Bool specifying whether to interpolate (true) or take the closest value (false, default)
| |
Reprojector |
Reprojector used when converting between map projections.
You can use this to set datum shift parameters. Any updates to the reprojector must be done after the target has been set and before calling Initialize. | |
TargetGridInfo |
Information on target grid. Null if not set (before calling one of the SetTarget method).
If not specified fully the target grid-info, this is first populated fully after Initialize. |
Name | Description | |
---|---|---|
Convert |
Convert source data to target data
| |
ConvertBitmapData |
NOTE: Experimental!
Convert source data to target data, assuming source and target are 32 bit bitmap data. When defining source and target grid, remember they must include the proper "scan width" (single row of pixels), which may be larger than the width of the bitmap image. Currently only supports top-down bitmaps. | |
Equals | (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Initialize |
Initialize; calculate target grid info (if necessary),
set up internal structures for fast processing of reprojections and interpolations.
| |
Initialize(Boolean) |
Initialize; calculate target grid info (if necessary),
set up internal structures for fast processing of reprojections and interpolations.
If only one conversion is required, set the oneTimeConvert to true, to skip setting up of internal structures. Currently only applicable if using the ConvertBitmapData(Byte, Byte) method. | |
SetTarget(GridReprojectorGridInfo) |
Fully specify the target gridinfo
| |
SetTarget(String, Double) |
Define target projection string, and orientation (towards projection north).
All other properties of the target GridInfo is calculated (during Initialize) from the bounding box of source grid in the target local grid coordinate system, such that the target contains the entire area defined by the source GridInfo. | |
SetTarget(String, Double, Int32, Int32) |
Define target projection string, orientation (towards projection north), and number of grid points
in the x and y direction in the target.
All other properties of the target GridInfo is calculated (during Initialize) from the bounding box of source grid in the target local grid coordinate system such that the target contains the entire area defined by the source GridInfo. Compared to SetTarget(String, Double), this version will change the resolution of the target grid in the x and y direction. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |