Global Mapper SDK
GM_ConvertCoordLayerGroundToPixel
Convert a coordinate between the current projection and layer pixel space and the current. The input layer must be a raster or gridded elevation layer (i.e. a layer where a pixel coordinate makes sense).
Syntax
C++
Copy
GM_Error_t32 __stdcall GM_ConvertCoordLayerGroundToPixel
(
GM_LayerHandle_t32 aLayer, // IN: raster layer to do conversion in
double aGroundX, // IN: X Coord in current projection
double aGroundY, // IN: Y Coord in current projection
double* aPixelX, // OUT: X Coord in layer pixel space
double* aPixelY // OUT: Y Coord in layer pixel space
)