Unigine.DatasetRasterPosResolver Class
This class is used to perform conversion between raster (x, y) and geodetic (latitude, longitude) coordinates.
DatasetRasterPosResolver Class
Properties
double ResolutionY#
Resolution along the y axis.
double ResolutionX#
Resolution along the x axis.
double OriginY#
The y coordinate of the origin.
double OriginX#
The x coordinate of the origin.
int RasterSizeY#
Raster size along the y axis.
int RasterSizeX#
Raster size along the x axis.
string Projection#
Current projection reference string.
Members
void GetGeodeticPosition ( int x, int y, out double latitude, out double longitude ) #
Performs conversion of raster coordinates (x, y) of a given point to geodetic coordinates (latitude, longitude) and puts them to latitude and longitude respectively.Arguments
- int x - X coordinate.
- int y - Y coordinate.
- out double latitude - Latitude coordinate.
- out double longitude - Longitude coordinate.
int GetRasterPosition ( double latitude, double longitude, out int x, out int y ) #
Performs conversion of geodetic coordinates (latitude, longitude) of a given point to raster coordinates (x, y) and puts them to x and y respectively.Arguments
- double latitude - Latitude coordinate.
- double longitude - Longitude coordinate.
- out int x - X coordinate.
- out int y - Y coordinate.
Return value
1 if resulting X coordinate is in the range [0, RasterSize_X] and Y coordinate is in the range [0, RasterSize_Y]; otherwise 0int GetRasterPosition ( double latitude, double longitude, out float x, out float y ) #
Performs conversion of geodetic coordinates (latitude, longitude) of a given point to raster coordinates (x, y) and puts them to x and y respectively.Arguments
- double latitude - Latitude coordinate.
- double longitude - Longitude coordinate.
- out float x - X coordinate.
- out float y - Y coordinate.
Return value
1 if resulting X and Y coordinates are in the range [0.0f, 1.0f]; otherwise 0void GetRasterPositions ( double[] latitudes, double[] longitude, int size, int[] ret_x, int[] ret_y, bool[] ret_pixels ) #
Performs conversion of geodetic coordinates (latitude, longitude) of given points specified in corresponding arrays to raster coordinates (x, y) and puts them to corresponding return arrays.Arguments
- double[] latitudes - Array with latitude coordinates.
- double[] longitude - Array with longitude coordinates.
- int size - Number of elements in coordinate arrays.
- int[] ret_x - Return array with X coordinates.
- int[] ret_y - Return array with Y coordinates.
- bool[] ret_pixels - Array of conversion results, where each element corresponding to a certain point is determined as follows: 1 if resulting X coordinate is in the range [0, RasterSize_X] and Y coordinate is in the range [0, RasterSize_Y]; otherwise 0
void GetRasterPositions ( double[] latitudes, double[] longitude, int size, float[] ret_x, float[] ret_y, bool[] ret_pixels ) #
Performs conversion of geodetic coordinates (latitude, longitude) of given points specified in corresponding arrays to raster coordinates (x, y) and puts them to corresponding return arrays.Arguments
- double[] latitudes - Array with latitude coordinates.
- double[] longitude - Array with longitude coordinates.
- int size - Number of elements in coordinate arrays.
- float[] ret_x - Return array with X coordinates.
- float[] ret_y - Return array with Y coordinates.
- bool[] ret_pixels - Array of conversion results, where each element corresponding to a certain point is determined as follows: 1 if resulting X and Y coordinates are in the range [0.0f, 1.0f]; otherwise 0
DatasetRasterPosResolver Create ( double[] geotransform, string projection, int size_x, int size_y ) #
Creates a DatasetRasterPosResolver with specified parameters.Arguments
- double[] geotransform - A GDAL geotransform array:
- geotransform[0] - top left x
- geotransform[1] - w-e pixel resolution
- geotransform[2] - rotation, 0 if image is "north up"
- geotransform[3] - top left y
- geotransform[4] - rotation, 0 if image is "north up"
- geotransform[5] - n-s pixel resolution
- string projection - Projection reference string.
- int size_x - Size along the X axis.
- int size_y - Size along the Y axis.
Return value
DatasetRasterPosResolver.Last update:
2019-08-16
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)