Unigine::DatasetRasterPosResolver Class
Header: | #include <UnigineDataset.h> |
This class is used to perform conversion between raster (x, y) and geodetic (latitude, longitude) coordinates.
DatasetRasterPosResolver Class
Members
void getGeodeticPosition ( int x, int y, double & latitude, 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.
- double & latitude - Latitude coordinate.
- double & longitude - Longitude coordinate.
double getOriginX ( ) #
Returns the X coordinate of the origin.Return value
X coordinate of the origin.double getOriginY ( ) #
Returns the Y coordinate of the origin.Return value
Y coordinate of the origin.const char * getProjection ( ) #
Returns current projection reference string.Return value
Projection reference string.int getRasterPosition ( double latitude, double longitude, int & x, 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.
- int & x - X coordinate.
- 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, float & x, 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.
- float & x - X coordinate.
- 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
int getRasterSizeX ( ) #
Returns raster size along the X axis.Return value
Raster size along the X axis.int getRasterSizeY ( ) #
Returns raster size along the Y axis.Return value
Raster size along the Y axis.double getResolutionX ( ) #
Returns resolution along the X axis.Return value
Resolution along the X axis.double getResolutionY ( ) #
Returns resolution along the Y axis.Return value
Resolution along the Y axis.Ptr<DatasetRasterPosResolver> create ( const double * geotransform, const char * projection, int size_x, int size_y ) #
Creates a DatasetRasterPosResolver with specified parameters.Arguments
- const 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
- const char * projection - Projection reference string.
- int size_x - Size along the X axis.
- int size_y - Size along the Y axis.
Return value
DatasetRasterPosResolver smart pointer.Last update:
25.12.2019
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter