Click or drag to resize

GM_Utility Class

Contains functions and datatypes from Global Mapper Interface that don't have any other home
Inheritance Hierarchy
SystemObject
  GlobalMapperGM_Utility

Namespace:  GlobalMapper
Assembly:  GlobalMapperWrapperNET45 (in GlobalMapperWrapperNET45.dll) Version: 19.1.0.0 (19.1.0.0)
Syntax
public static class GM_Utility

The GM_Utility type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddAreaToVectorLayer
Adds a area feature to a loaded vector layer
Public methodStatic memberAddCustomAreaClass
Adds a new custom area classification.
Public methodStatic memberAddCustomBrushStyle
Adds a new custom brush style that can be used when drawing area features (see the GM_SetAreaFeatureDrawStyle function)
Public methodStatic memberAddCustomDatum
Adds a new custom datum with the given parameters
Public methodStatic memberAddCustomEllipsoid
Adds a new custom ellipsoid with the given parameters
Public methodStatic memberAddCustomLineClass
Adds a new custom Line classification.
Public methodStatic memberAddCustomPointClass
Adds a new custom point classification.
Public methodStatic memberAddCustomShader
Adds a new custom shader for possible use for elevation layer display
Public methodStatic memberAddCustomSymbol
Adds a new custom symbol that can be used when drawing point features (see the GM_SetPointFeatureDrawStyle function)
Public methodStatic memberAreColorsEqual
Compares equality of colors not including the A value
Public methodStatic memberAreProjectionsEquivalent
Checks to see if the 2 projections are equivalent
Public methodStatic memberCalcAreaElevStats
Calculate the elevation statistics within a given area
Public methodStatic memberCalcBearing
Calculates the bearing in radians between two points. The points can either be specified as lat/lon values or in the current projection.
Public methodStatic memberCalcDistance
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 methodStatic memberCalcEnclosedArea
Calculates the enclosed area of a region in square meters.
Public methodStatic memberCalcProjectedLocation
Calculates the location of a new point projected from a start point along a given bearing.
Public methodStatic memberCalcScaleRectangle
Calculate the rectangle in global coordinates required to draw at the provided scale to the given device of the given size.
Public methodStatic memberCalcViewShed
Performs a view-shed analysis on loaded elevation data (not implemented on WinCE)
Public methodStatic memberCalcVolumeAlongLine
Calculates the cut-and-fill volumes along a given line (not implemented on WinCE)
Public methodStatic memberCalcVolumeOfArea
Calculates the cut-and-fill volumes within a given area (not implemented on WinCE)
Public methodStatic memberCalcWorldRectSize
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 methodStatic memberCombineAreas
Combines the list of areas and adds them to the specified layer (not implemented on WinCE)
Public methodStatic memberConvertCoordGroundToPixel
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 methodStatic memberConvertCoordGroundToPixelDouble
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 methodStatic memberConvertCoordGroundToPixelWithOrientation
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 methodStatic memberConvertCoordGroundToPixelWithOrientationDouble
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 methodStatic memberConvertCoordLayerGroundToPixel
Convert a coordinate between layer pixel space and the current projection.
Public methodStatic memberConvertCoordLayerPixelToGround
Convert a coordinate between layer pixel space and the current projection.
Public methodStatic memberConvertCoordPixelToGround
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 methodStatic memberConvertCoordPixelToGroundDouble
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 methodStatic memberConvertCoordPixelToGroundWithOrientation
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 methodStatic memberConvertCoordPixelToGroundWithOrientationDouble
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 methodStatic memberCreateBufferArea
Create a buffer area some distance around the specified feature (not implemented on WinCE)
Public methodStatic memberCreateS63UserPermitFile
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 methodStatic memberDecodeMGRSCoordinates
Decodes a MGRS (military grid reference system) coordinate into a X/Y or lat/lon location
Public methodStatic memberDrawGridLines
Draws grid lines (either lat/lon or in the view projection) for the specified location.
Public methodStatic memberDrawGridLinesEx
Draws grid lines (either lat/lon or in the view projection) for the specified location.
Public methodStatic memberDrawPackageList
Draws the specified portion of the specified packages to the device context. If no packages are explicitly specified, all loaded packages will be drawn.
Public methodStatic memberFreeAreaFeature
Frees the native resources used by the given area feature
Public methodStatic memberFreeLineFeature
Frees the native resources used by the given line feature
Public methodStatic memberFreePointFeature
Frees the native resources used by the given point feature
Public methodStatic memberGenerateAreasFromEqualValues
Performs a Create Areas From Equal Values process (not implemented on WinCE)
Public methodStatic memberGenerateContours
Generates contours for the given layer(s) (not implemented on WinCE)
Public methodStatic memberGenerateContoursEx
Generates contours for the given layer(s) (not implemented on WinCE)
Public methodStatic memberGenerateDensityGrid
Generate a density (heat) grid for points from the given layer (not implemented on WinCE)
Public methodStatic memberGenerateElevationGrid(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 methodStatic memberGenerateElevationGrid(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 methodStatic memberGenerateRoughnessGrid
Generates a roughness grid from the given land cover layer (not implemented on WinCE)
Public methodStatic memberGenerateWatershed
Performs a watershed/drainage/stream calculation based on the provided elevation layer(s) (not implemented on WinCE)
Public methodStatic memberGetAreaFeatureClassDrawStyle
Sets the default drawing style to use for a given area feature classification
Public methodStatic memberGetAreaFeatureEx
Gets a Area Feature in this layer at the specified index with optional flags.
Public methodStatic memberGetAvailableOnlineSourceList
Retrieves a list of all available online sources
Public methodStatic memberGetAvailableProjectionList
Retrieves a list of all available projections and their available parameters, datums, units, etc. Returns GM_ProjectionInfo_t* (array of GM_ProjectionInfo_t structures)
Public methodStatic memberGetAvailableSymbolNames
Returns the list of available symbol names (returns char**)
Public methodStatic memberGetBackgroundColor
Gets the color used for background pixels when drawing and exporting
Public methodStatic memberGetBaseProjection
Retrieves the underlying base projection that forms the basis for a given projection.
Public methodStatic memberGetDatumInfo
Gets the parameters for a particular datum
Public methodStatic memberGetElevationOverrides
Retrieves the elevation adjusment options to use for a given elevation layer
Public methodStatic memberGetElevationShaders
Returns a list of the available elevation shaders in type GM_CustomShader_t*
Public methodStatic memberGetFeatureClassInfo
Retrieves information about a given feature class
Public methodStatic memberGetFilterString
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 methodStatic memberGetLastDrawnScale
Return the scale value (i.e. 24000.0 for 1:24K) that data was last rendered at
Public methodStatic memberGetLineFeatureClassDrawStyle
Sets the default drawing style to use for a given Line feature classification
Public methodStatic memberGetLocationColor
Retrieves the color at a given location from a provided layer or from the list of currently loaded raster and elevation layers (topmost layer first).
Public methodStatic memberGetLocationElevation
Retrieves the elevation at a given location from a provided layer or from the list of currently loaded elevation layers (topmost elevation layer first).
Public methodStatic memberGetLocationElevationEx
Retrieves the elevation at a given location from a provided layer(s) or from the list of currently loaded elevation layers (topmost elevation layer first).
Public methodStatic memberGetMACAddress
Returns a string containing the MAC address of the current machine. May need to provide this to get a license file generated.
Public methodStatic memberGetMGRSCoordinates
Gets the MGRS (military grid reference system) coordinates for a location
Public methodStatic memberGetMiscOption
Gets the current value of an advanced/miscellaneous option. For most types return is GM_MiscOptVal_t8
Public methodStatic memberGetOnlineLayerZoomScale
Determine the zoom scale that will be used to draw/export from a provided tiled online layer for a given bounds.
Public methodStatic memberGetPackageLayerList
Returns a list of the layers that are in a given package. The pointer returned is temporary and will become invalid with the next call to this function.
Public methodStatic memberGetPathProfile
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 methodStatic memberGetPathProfileLOS
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 methodStatic memberGetPathProfileLOSEx
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 methodStatic memberGetPointFeatureClassDrawStyle
Sets the default drawing style to use for a given point feature classification
Public methodStatic memberGetProjection
Gets the current view/export projection
Public methodStatic memberGetRasterDisplayOptions
Retrieves the options to use when displaying the given raster layer
Public methodStatic memberGetSDKBuildDate
Returns the date that this SDK was built. Use this to provide more resolution for beta releases than GM_GetSDKVersion provides.
Public methodStatic memberGetSDKVersion
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 methodStatic memberGetShaderDisplayOptions
Retrieves the options to use for the elevation shaders [returns const GM_ShaderOptions_t*]
Public methodStatic memberGetVerticalDisplayOptions
Retrieves the options to use when displaying gridded elevation data. [returns const GM_VerticalDisplayOptions_t*]
Public methodStatic memberIsRegistered
Returns TRUE if the current user is registered or currently using a demo license.
Public methodStatic memberLoadMapLayoutFile
Loads a map layout from a .gm_layout file to setup elevation legend, scale, feature legend, and north arrow
Public methodStatic memberLoadPackage
Loads a new Global Mapper package (.gmp) file. You can also load package files with the GM_LoadLayerList command if you don't need to operate on the package as a whole. If
Public methodStatic memberLoadProjectionFile
Initializes a GM_Projection_t structure from a projection (PRJ, Ozi .map, etc.) file.
Public methodStatic memberLoadProjectionFromEPSGCode
Initializes a GM_Projection_t structure from an EPSG code
Public methodStatic memberLoadProjectionFromWKTString
Initializes a GM_Projection_t structure from a WKT projection string
Public methodStatic memberMapCatalogAddFile
Adds a new map to the map catalog from a file on disk
Public methodStatic memberMapCatalogAddLayer
Adds a new map to the map catalog from a loaded layer
Public methodStatic memberMapCatalogChangeMapOrder
Moves a map from one index (0-based) in the map list to another
Public methodStatic memberMapCatalogCreate
Creates a new map catalog layer for adding map layers to
Public methodStatic memberMapCatalogDisableMap
Disables/enables a map in a catalog (use GM_GetMapCatalogInfo to get the map count)
Public methodStatic memberMapCatalogGetInfo
Retrieves information and statistics about the catalog (use GM_GetLayerInfo for generic information)
Public methodStatic memberMapCatalogGetMapInfo
Retrieves information about a map in a catalog (use GM_GetMapCatalogInfo to get the map count)
Public methodStatic memberMapCatalogRemoveMap
Removes the map at the given index from the catalog
Public methodStatic memberMapCatalogSave
Saves a map catalog layer to a file on disk
Public methodStatic memberMapCatalogSetDisplayInfo
Sets when the layers in a map catalog should be displayed
Public methodStatic memberMapCatalogSetMapOption
Sets an option for a map in a map catalog, like the native projection. The data passed in depends on the option type.
Public methodStatic memberProjectPoint
Projects a point from one projection to another
Public methodStatic memberProjectPointAtElev
Projects a point from one projection to another at a fixed elevation above the ellipsoid.
Public methodStatic memberProjectPointFromECEF
Projects a point from ECEF (earth-centered earth-fixed) to a projection
Public methodStatic memberProjectPointList
Projects a list of points from one projection to another
Public methodStatic memberProjectPointToECEF
Projects a point from a projection to ECEF (earth-centered earth-fixed)
Public methodStatic memberProjectRectangle
Projects a rectangle from one projection to another
Public methodStatic memberRemoveCustomBrushStyle
Removes a custom brush style
Public methodStatic memberRemoveCustomShader
Removes a custom shader
Public methodStatic memberRemoveCustomSymbol
Removes a custom symbol
Public methodStatic memberRunScript
Runs a Global Mapper script (.gms) or workspace (.gmw), either from a file or from script text
Public methodStatic memberSaveProjectionToFile
Saves a GM_Projection_m structure to a projection (PRJ) file.
Public methodStatic memberSaveProjectionToString
Saves a GM_Projection_t structure to a WKT projection string.
Public methodStatic memberSaveWorkspace
Saves a list of loaded layers and display options to a workspace (GMW) file
Public methodStatic memberSaveWorkspaceEx
Saves a list of loaded layers and display options to a workspace (GMW) file
Public methodStatic memberSelectAreaStyle
Displays a dialog allowing the user to graphically select an area style (not available on WinCE)
Public methodStatic memberSelectFile
Displays a file dialog that allows the user to select a file to load.
Public methodStatic memberSelectFont
Select a font. Displays a dialog allowing the user to graphically select a font.
Public methodStatic memberSelectLineStyle
Displays a dialog allowing the user to graphically select a line style (not available on WinCE)
Public methodStatic memberSelectProjection
Displays the projection selection dialog to allow the user to select a projection
Public methodStatic memberSelectProjectionEx
Displays the projection selection dialog to allow the user to select a projection
Public methodStatic memberSetAreaFeatureClassDrawStyle
Sets the default drawing style to use for a given area feature classification
Public methodStatic memberSetBackgroundColor
Sets the color to be used for background pixels when drawing and exporting
Public methodStatic memberSetChildLayerOpCallback
Sets the callback function to call whenever a child layer is loaded or closed
Public methodStatic memberSetElevationOverrides
Sets the elevation adjustment options to use for a given elevation layer
Public methodStatic memberSetFeatureClassEnabled
Enables or disables the display of the given feature class.
Public methodStatic memberSetLicenseKey
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 methodStatic memberSetLineFeatureClassDrawStyle
Sets the default drawing style to use for a given line feature classification
Public methodStatic memberSetMemoryLimit
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 methodStatic memberSetMessageCallback
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 methodStatic memberSetMessageCallbackEx
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 methodStatic memberSetMiscOption
Sets an advanced/miscellaneous option to use during operation. Returns the previous value.
Public methodStatic memberSetMiscOptionEx
Sets an advanced/miscellaneous option to use during operation. Returns the previous value.
Public methodStatic memberSetOrientation
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 methodStatic memberSetPointFeatureClassDrawStyle
Sets the default drawing style to use for a given point feature classification
Public methodStatic memberSetProgressCallback
Returns the current progress callback function.
Public methodStatic memberSetProjectionEx
Set the new projection. This is the projection that all draws and exports will be done in. It is also the projection that all world bound rectangles will be in. This version allows providing a lat/lon bounding rectangle for automatic selection of the best zone for zoned projections.
Public methodStatic memberSetQueryProjectionCallback
Sets the function to call to select a projection for a layer when being loaded if the projection for that layer cannot be automatically determined. If a callback is provided, it will be called rather than the projection selection dialog being displayed.
Public methodStatic memberSetQuickPDFUnlockCode
Sets the QuickPDF library (http://www.quickpdflibrary.com/) unlock code (required for PDF/GeoPDF support)
Public methodStatic memberSetRasterDisplayOptions
Sets the options to use when displaying the given raster layer
Public methodStatic memberSetRegistryKey
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 methodStatic memberSetSettingsFilePath
Sets the path where to store settings files, like custom_datums.txt, etc.
Public methodStatic memberSetShaderDisplayOptions
Sets the options to use for the elevation shaders (call GM_GetShaderDisplayOptions to initialize)
Public methodStatic memberSetVectorDrawScale
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 methodStatic memberSetVerticalDisplayOptions
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.
Top
Fields
  NameDescription
Public fieldStatic memberMAX_NON_REGISTERED_VECTOR_IDX
Number of Vector features of a given type you can access when not registered
Top
See Also