GM_Utility Methods

The GM_Utility type exposes the following members.

Methods
Name Description
Public method Static member AddCustomShader
Adds a new custom shader for possible use for elevation layer display
Public method Static member AreColorsEqual
Compares equality of colors not including the A value
Public method Static member CalcAreaElevStats
Calculate the elevation statistics within a given area
Public method Static member CalcBearing
Calculates the bearing in radians between two points. The points can either be specified as lat/lon values or in the current projection.
Public method Static member CalcDistance
Calculates the great-circle distance in meters between two points. The points can either be specified as lat/lon values or in the current projection.
Public method Static member CalcEnclosedArea
Calculates the enclosed area of a region in square meters.
Public method Static member CalcProjectedLocation
Calculates the location of a new point projected from a start point along a given bearing.
Public method Static member CalcScaleRectangle
Calculate the rectangle in global coordinates required to draw at the provided scale to the given device of the given size.
Public method Static member CalcViewShed
Performs a view-shed analysis on loaded elevation data (not implemented on WinCE)
Public method Static member CalcVolumeAlongLine
Calculates the cut-and-fill volumes along a given line (not implemented on WinCE)
Public method Static member CalcVolumeOfArea
Calculates the cut-and-fill volumes within a given area (not implemented on WinCE)
Public method Static member CalcWorldRectSize
Calculates the width and height of a rectangle in the current projection. The rectangle can either be specified or the last drawn rectangle can be used.
Public method Static member ConvertCoordGroundToPixel
Convert a coordinate between the current projection and a pixel coordinate. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordGroundToPixelDouble
Convert a coordinate between the current projection and a pixel coordinate. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordGroundToPixelWithOrientation
Convert a coordinate between the current projection and a pixel coordinate. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordGroundToPixelWithOrientationDouble
Convert a coordinate between the current projection and a pixel coordinate. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordLayerGroundToPixel
Convert a coordinate between layer pixel space and the current projection.
Public method Static member ConvertCoordLayerPixelToGround
Convert a coordinate between layer pixel space and the current projection.
Public method Static member ConvertCoordPixelToGround
Convert a coordinate between pixel space and the current projection. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordPixelToGroundDouble
Convert a coordinate between pixel space and the current projection. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordPixelToGroundWithOrientation
Convert a coordinate between pixel space and the current projection. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member ConvertCoordPixelToGroundWithOrientationDouble
Convert a coordinate between pixel space and the current projection. The conversion space can be either the last drawn coordinate space or the caller can provide the coordinate space to work in.
Public method Static member CreateBufferArea
Create a buffer area some distance around the specified feature (not implemented on WinCE)
Public method Static member CreateS63UserPermitFile
Create a S-63 user permit file for use by clients to request encrypted S-63 chart files from data providers for loading with Global Mapper or your Global Mapper SDK-based application.
Public method Static member DrawGridLines
Draws grid lines (either lat/lon or in the view projection) for the specified location.
Public method Static member DrawGridLinesEx
Draws grid lines (either lat/lon or in the view projection) for the specified location.
Public method Static member GenerateContours
Generates contours for the given layer(s) (not implemented on WinCE)
Public method Static member GenerateContoursEx
Generates contours for the given layer(s) (not implemented on WinCE)
Public method Static member GenerateDensityGrid
Generate a density (heat) grid for points from the given layer (not implemented on WinCE)
Public method Static member GenerateElevationGrid(GM_LayerList_t, GM_GridGenSetup_t, GM_Layer_t)
Generates an elevation grid by triangulating and gridding 3D vector layers (not implemented on WinCE)
Public method Static member GenerateElevationGrid(GM_LayerList_t, GM_GridGenSetup_t, GM_Layer_t, GM_Layer_t)
Generates an elevation grid by triangulating and gridding 3D vector layers (not implemented on WinCE)
Public method Static member GenerateRoughnessGrid
Generates a roughness grid from the given land cover layer (not implemented on WinCE)
Public method Static member GenerateWatershed
Performs a watershed/drainage/stream calculation based on the provided elevation layer(s) (not implemented on WinCE)
Public method Static member GetBackgroundColor
Gets the color used for background pixels when drawing and exporting
Public method Static member GetElevationOverrides
Retrieves the elevation adjusment options to use for a given elevation layer
Public method Static member GetElevationShaders
Returns a list of the available elevation shaders in type GM_CustomShader_t*
Public method Static member GetFilterString
Returns a string containing the filter to use in a Windows file open dialog box for all of the types supported for loading from this DLL.
Public method Static member GetLastDrawnScale
Return the scale value (i.e. 24000.0 for 1:24K) that data was last rendered at
Public method Static member GetMACAddress
Returns a string containing the MAC address of the current machine. May need to provide this to get a license file generated.
Public method Static member GetMiscOption
Gets the current value of an advanced/miscellaneous option. For most types return is GM_MiscOptVal_t8
Public method Static member GetOnlineLayerZoomScale
Determine the zoom scale that will be used to draw/export from a provided tiled online layer for a given bounds.
Public method Static member GetPathProfile
Retrieves a list of elevations along a path in the provided layer or from the list of currently loaded elevation layers (topmost elevation layer first).
Public method Static member GetPathProfileLOS
Retrieves a list of elevations along a path in the provided layer or from the list of currently loaded elevation layers (topmost elevation layer first). Can also perform a line-of-sight calculation and return additional information about a 3D path (not implemented on WinCE).
Public method Static member GetPathProfileLOSEx
Retrieves a list of elevations along a path in the provided layer list or from the list of currently loaded elevation layers (topmost elevation layer first). Can also perform a line-of-sight calculation and return additional information about a 3D path.
Public method Static member GetRasterDisplayOptions
Retrieves the options to use when displaying the given raster layer
Public method Static member GetSDKBuildDate
Returns the date that this SDK was built. Use this to provide more resolution for beta releases than GM_GetSDKVersion provides.
Public method Static member GetSDKVersion
Returns the version of this SDK. The version is obtained by taking the major version number times 100 and adding the minor version number. For example, version 1.04 would be returned as 104.
Public method Static member GetShaderDisplayOptions
Retrieves the options to use for the elevation shaders [returns const GM_ShaderOptions_t*]
Public method Static member GetVerticalDisplayOptions
Retrieves the options to use when displaying gridded elevation data. [returns const GM_VerticalDisplayOptions_t*]
Public method Static member IsRegistered
Returns TRUE if the current user is registered or currently using a demo license.
Public method Static member LoadMapLayoutFile
Loads a map layout from a .gm_layout file to setup elevation legend, scale, feature legend, and north arrow
Public method Static member MapCatalogAddFile
Adds a new map to the map catalog from a file on disk
Public method Static member MapCatalogAddLayer
Adds a new map to the map catalog from a loaded layer
Public method Static member MapCatalogChangeMapOrder
Moves a map from one index (0-based) in the map list to another
Public method Static member MapCatalogCreate
Creates a new map catalog layer for adding map layers to
Public method Static member MapCatalogDisableMap
Disables/enables a map in a catalog (use GM_GetMapCatalogInfo to get the map count)
Public method Static member MapCatalogGetInfo
Retrieves information and statistics about the catalog (use GM_GetLayerInfo for generic information)
Public method Static member MapCatalogGetMapInfo
Retrieves information about a map in a catalog (use GM_GetMapCatalogInfo to get the map count)
Public method Static member MapCatalogRemoveMap
Removes the map at the given index from the catalog
Public method Static member MapCatalogSave
Saves a map catalog layer to a file on disk
Public method Static member MapCatalogSetDisplayInfo
Sets when the layers in a map catalog should be displayed
Public method Static member MapCatalogSetMapOption
Sets an option for a map in a map catalog, like the native projection. The data passed in depends on the option type.
Public method Static member ProjectPoint
Projects a point from one projection to another
Public method Static member ProjectPointAtElev
Projects a point from one projection to another at a fixed elevation above the ellipsoid.
Public method Static member ProjectPointFromECEF
Projects a point from ECEF (earth-centered earth-fixed) to a projection
Public method Static member ProjectPointList
Projects a list of points from one projection to another
Public method Static member ProjectPointToECEF
Projects a point from a projection to ECEF (earth-centered earth-fixed)
Public method Static member ProjectRectangle
Projects a rectangle from one projection to another
Public method Static member RemoveCustomShader
Removes a custom shader
Public method Static member RunScript
Runs a Global Mapper script (.gms) or workspace (.gmw), either from a file or from script text
Public method Static member SaveWorkspace
Saves a list of loaded layers and display options to a workspace (GMW) file
Public method Static member SaveWorkspaceEx
Saves a list of loaded layers and display options to a workspace (GMW) file
Public method Static member SelectFile
Displays a file dialog that allows the user to select a file to load.
Public method Static member SelectFont
Select a font. Displays a dialog allowing the user to graphically select a font.
Public method Static member SetBackgroundColor
Sets the color to be used for background pixels when drawing and exporting
Public method Static member SetChildLayerOpCallback
Sets the callback function to call whenever a child layer is loaded or closed
Public method Static member SetElevationOverrides
Sets the elevation adjustment options to use for a given elevation layer
Public method Static member SetLicenseKey
Use to provide the distribution license XML key that you were provided when purchasing a distribution license. Will return GM_Error_NotRegistered if the key could not be validated.
Public method Static member SetMemoryLimit
Sets the amount of available memory below which loads should fail and return (GM_Error_LowMemory). Set to zero to reset to no memory limit checking. [WinCE only]
Public method Static member SetMessageCallback
Sets the function to call to display error and warning messages generated during SDK operations. If a message callback is provided, a message dialog will not be shown, instead the callback function will be called with the error or warning message that would have been displayed.
Public method Static member SetMiscOption
Sets an advanced/miscellaneous option to use during operation. Returns the previous value.
Public method Static member SetMiscOptionEx
Sets an advanced/miscellaneous option to use during operation. Returns the previous value.
Public method Static member SetOrientation
Allows for drawing data with a direction other than north to the top of the screen for most projections. A value of 0.0 is the default and implies no rotation. Technically, the orientation value is the number of degrees to rotate the rendered data counter-clockwise.
Public method Static member SetProgressCallback
Sets the function to call to report the progress of an operation, like the loading of a file. If a progress callback is provided, a progress dialog will not be shown, instead the callback function will be called.
Public method Static member SetQuickPDFUnlockCode
Sets the QuickPDF library (http://www.quickpdflibrary.com/) unlock code (required for PDF/GeoPDF support)
Public method Static member SetRasterDisplayOptions
Sets the options to use when displaying the given raster layer
Public method Static member SetRegistryKey
Sets the base registry key from which settings should be stored/read. Settings will be stored in and read from "HKEY_CURRENT_USER\Software\*aKeyName*\Global Mapper".
Public method Static member SetSettingsFilePath
Sets the path where to store settings files, like custom_datums.txt, etc.
Public method Static member SetShaderDisplayOptions
Sets the options to use for the elevation shaders (call GM_GetShaderDisplayOptions to initialize)
Public method Static member SetVectorDrawScale
Specifies the extra scaling factor to apply to line widths, point symbols, and fonts when drawing. This is useful when printing to try and keep vector features the same size as displayed.
Public method Static member SetVerticalDisplayOptions
Sets the options to use when displaying gridded elevation data. If you're not going to change everything, it's suggested that you first call GM_GetVerticalDisplayOptions to initialize the structure to the current settings.
Public method Static member WindsimGetArtifacts
Export GWS and Wasp MAP file - custom project for Windsim
Top
See Also