This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.DatasetRasterPosResolver Class

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, 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.

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.

string getProjection()

Returns current projection reference string.

Return value

Projection reference string.

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 0

int 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 0

void 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.

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: 2018-08-10
Build: ()