GM module

The GM Module contains classes with initialized values that can be instantiated when the object is created. The objects defined in classes are most often sets of parameters passed to functions, or sets of data values returned from functions. By convention, classes in globalmapper end with a “_t” suffix.

class GM.Point_t(mX, mY)[source]

Bases: globalmapper.GM_Point_t

This describes a single point location

Parameters
  • mX (float) – X (or longitude) coordinate

  • mY (float) – Y (or latitude) coordinate

class GM.LidarReturnInfo_t(mCount=0, mMinZ=0, mMaxZ=0, mMinI=0, mMaxI=0, mSyntheticCount=0, mWithheldCount=0, mKeyPointCount=0, mOverlapCount=0)[source]

Bases: globalmapper.GM_LidarReturnInfo_t

Statistics about different Lidar point types. This can be used for statistics for a single class or return type

Parameters
  • mCount (int) – Number of points encountered of this type

  • mMinZ (int) – Minimum Z value

  • mMaxZ (int) – Maximum Z value

  • mMinI (int) – Minimum Intensity value

  • mMaxI (int) – Maximum Intensity value

  • mSyntheticCount (int) – Synthetic count

  • mWithheldCount (int) – Withheld count

  • mKeyPointCount (int) – Model key count

  • mOverlapCount (int) – Overlap point count

class GM.LidarAttrInfo_t(mMinVal=0, mMaxVal=0)[source]

Bases: globalmapper.GM_LidarAttrInfo_t

Definition of statistics for each Lidar attribute

LidarAttrInfo_t(mMinVal: int=0, mMaxVal: int=0)

Parameters
  • mMinVal (int) – Minimum encountered value

  • mMaxVal (int) – Maximum encountered value

class GM.LidarPoint_t(mLayer=0, mPointIdx=0, mFlags=0, mPos=(0.0, 0.0), mElevMeters=0, mIntensity=0, mClass=1, mRetNum=0, mRetCount=0, mUserData=0, mScannerChannel=0, mScanAngle=0, mGpsTime=0.0, mSourceId=0, mRed=0, mGreen=0, mBlue=0, mNIR=0)[source]

Bases: globalmapper.GM_LidarPoint_t

This type is used to return information about Lidar point cloud features

LidarPoint_t(mLayer: int = 0, mPointIdx: int = 0, mFlags: int = 0, mPos= Point_t(0, 0), mElevMeters: float = 0,

mIntensity: int = 0, mClass=gm.GM_LidarClass_Unclassified, mRetNum: int = 0, mRetCount: int = 0, mUserData: int = 0, mScannerChannel: int = 0, mScanAngle: int = 0, mGpsTime: float = 0.0, mSourceId: int = 0, mRed: int = 0, mGreen: int = 0, mBlue: int = 0, mNIR: int = 0)

Parameters
  • mLayer (int) – Layer the point is from

  • mPointIdx (int) – Point index in cloud

  • mFlags (int) – Flags about the point

  • mPos (Point_t) – Location of the point (global coordinates when getting, native when adding feature)

  • mElevMeters (float) – Elevation of point in meters

  • mIntensity (int) – Intensity

  • mClass (GM_LidarClass_t8, int) – Classification

  • mRetNum (int) – Return number

  • mRetCount (int) – Number of returns

  • mUserData (int) – User data

  • mScannerChannel (int) – Scanner channel

  • mScanAngle (float) – Scan Angle

  • mGpsTime (double (float)) – GPS time

  • mSourceId (int) – Point Source ID

  • mRed (int) – Red color value

  • mGreen (int) – Green color value

  • mBlue (int) – Blue color value

  • mNIR (int) – NIR (near infrared) value

class GM.ElevColor_t(mElev=5, mColor=4294967295)[source]

Bases: globalmapper.GM_ElevColor_t

This type represents a single elevation/color pair for a custom shader

ElevColor_t(mElev: float=5, mColor: int=0xFFFFFFFF)

Parameters
  • mElev (float, default 5) – Elevation value in meters

  • mColor (COLORREF, int, default 0xFFFFFFFF) – Color value

class GM.AttrValue_t(mName, mVal)[source]

Bases: globalmapper.GM_AttrValue_t

This type is used to represent a single attribute value pair

AttrValue_t(mName:str , mVal: str)

Parameters
  • mName (string) – Name of the attribute

  • mVal (string) – Value of the attribute

class GM.OnlineSourceInfo_t(mName='Default Online name', mType=0, mAttrList=<globalmapper.GM_AttrValue_array; proxy of <Swig Object of type 'GM_AttrValue_array *'> >, mAttrListSize=0)[source]

Bases: globalmapper.GM_OnlineSourceInfo_t

This type is used to return information about available online sources

OnlineSourceInfo_t( mAttrList: gm.GM_AttrValue_array = gm.GM_AttrValue_array(0), mAttrListSize: int = 0, mType: int = gm.GM_SourceType_WMS, mName: str = ‘Default Online name’))

Parameters
  • mName (str) – Name of the online source. This can be passed to LoadOnlineLayer

  • mType (GM_OnlineSourceType_t, int, default gm.GM_SourceType_WMS) – Source type

  • mAttrList (AttrValue_array) – List of additional attributes and values for the source

  • mAttrListSize (int, uint32) – Number of entries in mAttrList

class GM.CustomShader_t(mShaderName=None, mFlags=1, mNumElevs=1, mElevColorList=<globalmapper.GM_ElevColor_array; proxy of <Swig Object of type 'GM_ElevColor_array *'> >)[source]

Bases: globalmapper.GM_CustomShader_t

This type represents a custom elevation shader

CustomShader_t(mShaderName: str = None, mFlags: int = gm.GM_CustomShader_DontBlend,mNumElevs: int = 1,

mElevColorList: gm.GM_ElevColor_array = gm.GM_ElevColor_array(1))

Parameters
  • mShaderName (str) – Name to use for the shader, default=None

  • mFlags (GM_CustomShaderFlags_t32, int, default gm.GM_CustomShader_DontBlend) – Shader flags

  • mNumElevs (int, uint32, default 1) – Number of elements in the argument mElevColorList

  • mElevColorList (ElevColor_array) – List of elevation/color pairs for shader

class GM.GroundControlPoint_t(mPixelX=0, mPixelY=0, mGroundX=0, mGroundY=0)[source]

Bases: globalmapper.GM_GroundControlPoint_t

This type is used when rectifying imagery

GroundControlPoint_t(mPixelX: float = 0, mPixelY: float = 0, mGroundX: float = 0, mGroundY: float = 0)

Parameters
  • mPixelX (float) – X pixel coordinate of GCP

  • mPixelY (float) – Y pixel coordinate of GCP (top is 0, increases down)

  • mGroundX (float) – X ground coordinate of GCP (in provided projection)

  • mGroundY (float) – Y ground coordinate of GCP (in provided projection)

class GM.uint8(val)[source]

Bases: int

Unsigned character type definition. 0 to 255.

class GM.uint32(val)[source]

Bases: int

Unsigned long integer type definition. 0 to 4294967295.

class GM.LayerHandle_t(val)[source]

Bases: int

This type is used to reference a single layer loaded by the DLL.

class GM.COLORREF(val)[source]

Bases: int

This type is used to represent a single color palette entry

GM.array(*args, **kwargs)[source]

Factory method function for creating globalmapper.py arrays

class GM.array_range(array, size)[source]

Bases: object

Class for globalmapper.py array iteration

array_range(array, size)

Parameters
  • array (globalmapper.xx_array) – The array to iterate

  • size (int) – The size of the array

class GM.AreaElevStats_t(mSize, mNumSamples, mAvgElev, mMinElev, mMaxElev, mStdDevElev, mModeElev, mAvgSlope, mMaxSlope, mStdDevSlope, mNumIgnoredSamples=0)[source]

Bases: globalmapper.GM_AreaElevStats_t

This type is used for returning the calculated elevation statistics within an area

AreaElevStats_t(mSize: int, mNumSamples: int, mAvgElev: float, mMinElev: float, mMaxElev: float, mStdDevElev: float, mModeElev: float, mAvgSlope: float, mMaxSlope: float, mStdDevSlope: float, mNumIgnoredSamples: int = 0)

Parameters
  • mSize (int (uint32)) – Size of the structure

  • mNumSamples (uint64, int) – Number of locations sampled to compute statistics

  • mAvgElev (float) – Average elevation in meters

  • mMinElev (float) – Minimum elevation in meters

  • mMaxElev (float) – Maximum elevvation in meters

  • mStdDevElev (float) – Standard deviation of elevation in meters

  • mModeElev (float) – approximate mode value of elevation in meters

  • mAvgSlope (float) – Average slope in degrees

  • mMaxSlope (float) – Maximum slope in degrees

  • mStdDevSlope (float) – Standard deviation of slope in degrees

  • mNumIgnoredSamples (uint64, int) – Number of samples that were ignored due to being outside the crop areas or having no elevation

class GM.FontDef_t(mFaceName='System', mColor=0, mWeight=10, mPointSize=0, mItalicize=False, mUnderline=False, mStrikeout=False, mCharset=255, mBgMode=1, mFixedHgt=0.0, mPlacement=0, mHalo=True, mReserved2=0, mReserved3=0, mAngle=0)[source]

Bases: globalmapper.GM_FontDef_t

This type is used to describe a font used for rendering text

FontDef_t(mFaceName: str = ‘System’, mColor: int = 0, mWeight: int = 10, mPointSize: int = 0, mItalicize: bool = False, mUnderline: bool = False, mStrikeout: bool = False, mCharset: int = 255, mBgMode: int = gm.GM_Font_BgOpaque, mFixedHgt: float = 0.0, mPlacement: int = gm.GM_LABEL_AUTO, mHalo: bool = True, mReserved2: int = 0, mReserved3: int = 0, mAngle: float = 0)

Parameters
  • mFaceName (str, default 'System') – Name of font face used

  • mColor (COLORREF) – RGB color of font

  • mWeight (int (uint16)) – Weight of font (use GM_Constants, like FW_BOLD, FW_THIN, FW_NORMAL, etc.)

  • mPointSize (int (uint8)) – Font point size (set mFixedHgt value to non-zero to use fixed height)

  • mItalicize (bool) – Draw text with italics?

  • mUnderline (bool) – Underline text?

  • mStrikeout (bool) – Strikeout text?

  • mCharset (int) – Character set (use OEM_CHARSET (255) for default behavior)

  • mBgMode (GM_FontBackground_t8) – Background fill mode (i.e. opaque or transparent)

  • mFixedHgt (float) – Fixed height of font in meters (use 0.0 for normal point-size font)

  • mPlacement (GM_LabelPlacement_t8) – Label placement relative to point features (only applies for point features)

  • mHalo (bool) – Draw thin halo around text to make it visible on any background.

  • mReserved2 (int (uint8)) – Reserved, must be 0

  • mReserved2 – Reserved, must be 0

  • mAngle (float) – Counter-clockwise rotation angle of angle (0 is horizontal left to right)

  • mReserved3 (int) –

class GM.SpatialOps_Params_t(mLogCallback, mFeatureTypes1=0, mFeatureTypes2=0, mPredicateResultTarget=0, mResultLayerName='', mResultLayer=0, mResultFeatureTypes=0, mResultLayerIsTemp=False, mErrorHandling=0, mAttemptRepair=True)[source]

Bases: globalmapper.GM_SpatialOps_Params_t

Structure defining parameters for spatial operations and spatial predicates

SpatialOps_Params_t(mLogCallback, mFeatureTypes1: int=0, mFeatureTypes2: int=0, mPredicateResultTarget: int=0, mResultLayerName: str=””, mResultLayer: int=0, mResultFeatureTypes: int=0, mResultLayerIsTemp: bool=False, mErrorHandling: int=0, mAttemptRepair: bool=True)

Parameters
  • mFeatureTypes1 (GM_FeatureFilters_t8, int) – Feature types for layer 1

  • mFeatureTypes2 (GM_FeatureFilters_t8, int) – Feature types for layer 2

  • mPredicateResultTarget (GM_PredicateResultTargets_t8 (int)) – Where to store the results of the predicate

  • mResultLayerName (str) – Name of result layer

  • mResultLayer (GM_LayerHandle_t32 (int)) – Layer to add geometries to

  • mResultFeatureTypes (GM_FeatureFilters_t8 (int)) – Desired feature class type(s) for results

  • mResultLayerIsTemp (bool) – If true, result layer should not appear in the Control Panel

  • mErrorHandling (GM_SpatialOps_Errorhandling_t8 (int)) – Error handling behavior for inputs to the operation

  • mAttemptRepair (bool) – Attempt repair on invalid input geometries

  • mLogCallback (GM_MessageCallbackFunc) – Callback for displaying error and warning messages.

class GM.AreaStyle_t(mBorderPenStyle=0, mBorderPenWidth=1, mBorderPenColor=0, mBrushColor=0, mBrushStyle=1, mDrawLabel=False, mDrawLabelAlways=False, mFont={'mAngle': 0.0, 'mBgMode': 1, 'mCharset': 255, 'mColor': 0, 'mFaceName': 'System', 'mFixedHgt': 0.0, 'mHalo': 1, 'mItalicize': 0, 'mPlacement': 0, 'mPointSize': 0, 'mReserved2': 0, 'mReserved3': 0, 'mStrikeout': 0, 'mUnderline': 0, 'mWeight': 10})[source]

Bases: globalmapper.GM_AreaStyle_t

This type is used to describe a style used for drawing an area feature and its label (if any)

AreaStyle_t(mBorderPenStyle=gm.GM_PEN_SOLID, mBorderPenWidth: int = 1, mBorderPenColor: int = 0, mBrushColor: int = 0, mBrushStyle=gm.GM_BRUSH_SOLID, mDrawLabel: bool = False, mDrawLabelAlways: bool = False, mFont: FontDef_t = FontDef_t())

Parameters
  • mBorderPenColor (COLORREF (int)) – color to use for border pen

  • mBorderPenStyle (PenStyle_t16) – Border pen style (i.e. solid, dash, etc.)

  • mBorderPenWidth (Unsigned integer) – Width to draw border pen in

  • mBrushColor (COLORREF (int)) – color of brush to fill area with (when applicable to brush style). The color is defined as ARGB where the upper 8 bits are alpha. The exception is a value of 0 in the A is treated as no alpha.

  • mBrushStyle (BrushStyle_t16 Enumeration) – Style of brush to fill area with

  • mDrawLabel (boolean) – Render the label for this line if there is one

  • mDrawLabelAlways (boolean) – Render the label for this line even if it collides with another display label

  • mFont (FontDef_t) – Font to use to render label

class GM.VectorFeature_t(mName=None, mDesc=None, mClass=0, mAttrList=<globalmapper.GM_AttrValue_array; proxy of <Swig Object of type 'GM_AttrValue_array *'> >, mNumAttrs=2)[source]

Bases: globalmapper.GM_VectorFeature_t

This type is used as the base for any vector feature information

VectorFeature_t(mAttrList: gm.GM_AttrValue_array = array(
[AttrValue_t(‘Name1’, ‘Val1’), AttrValue_t(‘Name2’, ‘Val2’)]),

mNumAttrs: int = 2, mClass: int = 16, mDesc: str = None, mName: str = None)

Parameters
  • mAttrList (gm.AttrValue_array) – List of attributes associated with feature

  • mNumAttrs (int (uint16)) – Number of elements in mAttrList

  • mClass (FeatureClass_t16) – Global Mapper classification assigned to the feature

  • mDesc (str) – Description of the feature

  • mName (str) – Name of the feature

class GM.HoleInArea_t(mPoints, mNumPoints, mVertexElevList=None)[source]

Bases: globalmapper.GM_HoleInArea_t

This type is used to store information about holes within area features

HoleInArea_t(mPoints: Point_t_array, mNumPoints: int, mVertexElevList: float_array)

Parameters
  • mPoints (Point_t_array) – List of points in the hole in global coordinates (pointer to GM_Point_t array)

  • mNumPoints (int) – Number of points in the list. Automatically set when the point list is updated

  • mVertexElevList (float_array) – Optional list of elevations for each point in line. If present, must have mNumPoints values

class GM.AreaFeature_t(mFeatureInfo={'mAttrList': {'mName': 'Name1', 'mVal': 'Val1'}, 'mClass': 0, 'mDesc': None, 'mName': None, 'mNumAttrs': 2}, mPointList=<globalmapper.GM_Point_t_array; proxy of <Swig Object of type 'GM_Point_t_array *'> >, mNumPoints=2, mHoleList={'mNumPoints': 2, 'mPoints': (0.0, 0.0), 'mVertexElevList': None}, mNumHoles=1, mAreaStyle={'mBorderPenColor': 0, 'mBorderPenStyle': 0, 'mBorderPenWidth': 1, 'mBrushColor': 0, 'mBrushStyle': 1, 'mDrawLabel': 0, 'mDrawLabelAlways': 0, 'mFont': {'mAngle': 0.0, 'mBgMode': 1, 'mCharset': 255, 'mColor': 0, 'mFaceName': 'System', 'mFixedHgt': 0.0, 'mHalo': 1, 'mItalicize': 0, 'mPlacement': 0, 'mPointSize': 0, 'mReserved2': 0, 'mReserved3': 0, 'mStrikeout': 0, 'mUnderline': 0, 'mWeight': 10}}, mVertexElevList=None)[source]

Bases: globalmapper.GM_AreaFeature_t

AreaFeature_t(mFeatureInfo: VectorFeature_t = VectorFeature_t(), mPointList: gm.GM_Point_t_array = array([Point_t(0, 0), Point_t(0, 1)]), mNumPoints: int=2,

mHoleList: HoleInArea_t = HoleInArea_t(array([Point_t(0, 0), Point_t(0, 1)]), 2),mNumHoles: int = 1, mAreaStyle: AreaStyle_t = AreaStyle_t(), mVertexElevList: float = None)

Parameters
  • mFeatureInfo (VectorFeature_t) – The General Vector Feature Info

  • mPointList (Point_t) – List of points that make up the area (global coordinates when getting, native when adding feature)

  • mNumPoints (int, uint32) – Number of points in the list

  • mHoleList (HoleInArea_t) – List of holes in the area

  • mNumHoles (int, uint32) – Number of holes in the list of holes

  • mAreaStyle (AreaStyle_t) – Area render style (symbol and font)

  • mVertexElevList (float) – Optional list of elevations for each point in area. If present, must be same size as mPointsList

class GM.AreaVolumeParams_t(mSize=0, mPoints=<globalmapper.GM_Point_t_array; proxy of <Swig Object of type 'GM_Point_t_array *'> >, mNumPoints=2, mCutHeight=0.0, mXSpacing=0.0, mYSpacing=0.0, mFillGaps=True)[source]

Bases: globalmapper.GM_AreaVolumeParams_t

This type is used to provide the parameters for calculating cut-and-fill volumes within an area feature

AreaVolumeParams_t(mSize = 0, mPoints: gm.GM_Point_t_array = array([Point_t(0, 0), Point_t(0, 1)]), mNumPoints: int = 2, mCutHeight: float = 0.0, mXSpacing: float = 0.0, mYSpacing: float = 0.0, mFillGaps: bool = True)

Parameters
  • mSize (int, uint32) – Size of structure

  • mPoints (Point_t) – List of points in area in global coordinate system

  • mNumPoints (int, uint32) – Number of points in the argument mPoints

  • mCutHeight (float) – Cut height in meters above sea level

  • mXSpacing (float) – Sample spacing in the x direction in global units

  • mYSpacing (float) – Sample spacing in the y direction in global units

  • mFillGaps (boolean) – Fill gaps in terrain from surrounding data

class GM.AsciiFormatInfo_t(mImportType=1, mCoordDelim=0, mCoordOrder=0, mIncludeCoordAttrs=False, mColumnHeadersInFirstRow=True, mIncludeElevCoords=False, mColumnsToSkip=0, mLinesToSkip=0, mCoordLinePrefix=None, mAreaType=90, mLineType=0, mPointType=0, mIgnoreZeroElevations=True, mFillToBounds=False, mOffsetX=0.0, mOffsetY=0.0, mOffsetZ=0.0, mScaleX=1.0, mScaleY=1.0, mScaleZ=1.0, mNoDataDistanceFactor=0.0, mBreakOnColumnIdx=None, mCoordFormat=0)[source]

Bases: globalmapper.GM_AsciiFormatInfo_t

This type represents layout information for a generic ASCII import

AsciiFormatInfo_t(mImportType=gm.GM_AsciiImport_Vector, mCoordDelim=gm.GM_AsciiDelim_AutoDetect, mCoordOrder=gm.GM_AsciiCoordOrder_XFirst, mIncludeCoordAttrs: bool = False, mColumnHeadersInFirstRow: bool = True, mIncludeElevCoords: bool = False, mColumnsToSkip: int = 0, mLinesToSkip: int = 0, mCoordLinePrefix: str = None, mAreaType=gm.AFC_UNKNOWN, mLineType=gm.LFC_MIN_LINE, mPointType=gm.PFC_MIN_POINT, mIgnoreZeroElevations: bool = True, mFillToBounds: bool = False, mOffsetX: float = 0.0, mOffsetY: float = 0.0, mOffsetZ: float = 0.0, mScaleX: float = 1.0, mScaleY: float = 1.0, mScaleZ: float = 1.0, mNoDataDistanceFactor: float = 0.0, mBreakOnColumnIdx: gm.uint8_array = gm.uint8_array(2),mCoordFormat=gm.GM_AsciiCoordFormat_Decimal,):

Parameters
  • mImportType (GM_AsciiImportType_t8) – Specify import type

  • mCoordDelim (GM_AsciiCoordDelim_t8) – Specify coordinate delimiter

  • mCoordOrder (GM_AsciiCoordOrder_t8) – Coordinate order

  • mIncludeCoordAttrs (boolean) – attributes from coordinate lines

  • mColumnHeadersInFirstRow (boolean) – Is the first row of the file column headers? (like for CSV files)

  • mIncludeElevCoords (boolean) – Is the 3rd coordinate column an elevation or Z value? Must be TRUE for eAsciiImportElevation import type.

  • mColumnsToSkip (int, uint8) – Columns to skip before reaching coordinate columns

  • mLinesToSkip (int, uint8) – Number of lines to skip

  • mCoordLinePrefix (string) – Prefix to look for at beginning of coordinate lines (default to NULL or empty)

  • mAreaType (AreaFeatureClass_t16) – Area type to assign to imported created area features

  • mLineType (LineFeatureClass_t16) – Line type to assign to imported created line features

  • mPointType (PointFeatureClass_t16) – Point type to assign to imported point features

  • mIgnoreZeroElevations (boolean) – Ignore features with an elevation of zero

  • mFillToBounds (boolean) – Fill grid to full bounds of data (i.e. don’t constrict to convex hull)

  • mOffsetX (float) – Offset to apply to X coordinates

  • mOffsetY (float) – Offset to apply to Y coordinates

  • mOffsetZ (float) – Offset to apply to Z coordinates

  • mScaleX (float) – Scale to apply to X coordinates (default is 1.0)

  • mScaleY (float) – Scale to apply to Y coordinates (default is 1.0)

  • mScaleZ (float) – Scale to apply to Z coordinates (default is 1.0)

  • mNoDataDistanceFactor (float) – Tightness factor to use when gridding 3D data. Use 0.0 for default.

  • mBreakOnColumnIdx (int, uint8) – Index of column to break features on when value changes. Pass NULL for default break behavior.

  • mCoordFormat (GM_AsciiCoordFormat_t8) – Coordinate format

class GM.Color_t(mRed=0, mGreen=0, mBlue=0)[source]

Bases: globalmapper.GM_Color_t

This type is used when returning a color

Color_t(mRed: int = 0, mGreen: int = 0, mBlue: int = 0)

Parameters
  • mRed (int, uint8) – Red component of color

  • mGreen (int, uint8) – Green component of color

  • mBlue (int, uint8) – Blue component of color

class GM.Rectangle_t(mMinX=0, mMinY=0, mMaxX=0, mMaxY=0)[source]

Bases: globalmapper.GM_Rectangle_t

This type describes a bounding rectangle in world coordinates

Rectangle_t(mMinX: float = 0, mMinY: float = 0, mMaxX: float = 0, mMaxY: float = 0)

Parameters
  • mMinX (float) – Minimum x/easting/longitude coordinate

  • mMinY (float) – Minimum y/northing/latitude coordinate

  • mMaxX (float) – Maximum x/easting/longitude coordinate

  • mMaxY (float) – Maximum y/northing/latitude coordinate

class GM.ContourParams_t(mSize=0, mDesc=None, mContourBounds=(0.0, 0.0, 0.0, 0.0), mContourInterval=20.0, mIntervalInFeet=False, mGenerateAreas=False, mGenerateSpotElevs=True, mNumberOnlyLabels=False, mShowProgress=True, mDisableSmoothing=False, mCreateFromAbove=False, mSingleLevelOnly=False, mXSpacing=0.0, mYSpacing=0.0, mSimpThreshold=0.0)[source]

Bases: globalmapper.GM_ContourParams_t

This type is used to provide the parameters for generating contours

ContourParams_t(mSize: int = 0, mDesc: str = None, mContourBounds: Rectangle_t = Rectangle_t(),

mContourInterval: float = 20.0, mIntervalInFeet: bool = False, mGenerateAreas: bool = False, mGenerateSpotElevs: bool = True, mNumberOnlyLabels: bool = False, mShowProgress: bool = True, mDisableSmoothing: bool = False, mCreateFromAbove: bool = False, mSingleLevelOnly: bool = False, mXSpacing: float = 0.0, mYSpacing: float = 0.0, mSimpThreshold: float = 0.0)

Parameters
  • mSize (int (uint32)) – Size

  • mDesc (str) – Contour layer description

  • mContourBounds (Rectangle_t) – Bounds of contour lines to create. Pass empty rectangle to use entirety of passed in layer(s).

  • mContourInterval (float) – Contour interval

  • mIntervalInFeet (bool) – Set to TRUE if the contour interval is in feet rather than meters

  • mGenerateAreas (bool) – Generate iso-height areas in addition to contour lines

  • mGenerateSpotElevs (bool) – Generate spot elevation points at minimum and maximum elevations

  • mNumberOnlyLabels (bool) – Only include the value (and not the units string) in the contour labels

  • mShowProgress (bool) – Display contour generation progress dialog

  • mDisableSmoothing (bool) – Do not smooth the generated contour lines to improve their appearance

  • mCreateFromAbove (bool) – ADVANCED: Create contours as we go from above to contour rather than from contour to below.

  • mSingleLevelOnly (bool) – Only create a single contour level rather than treating as interval

  • mXSpacing (float) – Sample spacing in the x direction

  • mYSpacing (float) – Sample spacing in the y direction

  • mSimpThreshold (float) – Simplification threshold, use 0.0 for no simplification

class GM.DatumInfo_t(mMethod=0, mDatumName=None, mEllipsoidName=None, mDeltaX=0.5, mDeltaY=0.5, mDeltaZ=0.5, mScale=1, mRotX=0.0, mRotY=0.0, mRotZ=0.0, mPrimeMeridian=0.0, mPrimeMeridianName=None, mSemiMajor=1, mSemiMinor=1)[source]

Bases: globalmapper.GM_DatumInfo_t

This type represents information about a datum

DatumInfo_t(mMethod=gm.GM_Datum_Molodensky, mDatumName: str = None, mEllipsoidName: str = None,

mDeltaX: float = 0.5, mDeltaY: float = 0.5, mDeltaZ: float = 0.5,mScale: float = 1,mRotX: float = 0.0, mRotY: float = 0.0, mRotZ: float = 0.0, mPrimeMeridian: float = 0.0, mPrimeMeridianName: str = None, mSemiMajor: float = 1, mSemiMinor: float = 1)

Parameters
  • mMethod (GM_DatumXForm_t32) – Transformation method

  • mDatumName (str) – Name of datum

  • mEllipsoidName (str) – Name of ellipsoid this datum is based on

  • mDeltaX (float) – Delta X in meters

  • mDeltaY (float) – Delta Y in meters

  • mDeltaZ (float) – Delta Z in meters

  • mScale (float) – Scale factor (GM_Datum_BursaWolfe only)

  • mRotX (float) – Rotation in X in arc seconds (GM_Datum_BursaWolfe only)

  • mRotY (float) – Rotation in Y in arc seconds (GM_Datum_BursaWolfe only)

  • mRotZ (float) – Rotation in Z in arc seconds (GM_Datum_BursaWolfe only)

  • mPrimeMeridian (float) – Prime meridian for datum (0.0 for Greenwich)

  • mPrimeMeridianName (str) – Optional name of prime meridian

  • mSemiMajor (float) – Ellipsoid semi-major axis (output only)

  • mSemiMinor (float) – Ellipsoid semi-major axis (output only)

class GM.DensityGridParams_t(mFlags=1, mKernelType=0, mRadiusMeters=6, mCellsPerRadius=3, mLayerDesc='Density grid_test_GM_attrtibute', mField='', mAreaUnits=4, mBoundingBox=(0.0, 0.0, 0.0, 0.0))[source]

Bases: globalmapper.GM_DensityGridParams_t

Class to define options for calculating a density grid

DensityGridParams_t(mBoundingBox: Rectangle_t = Rectangle_t(), mAreaUnits = gm.GM_AREA_SQ_KM, mCellsPerRadius: int = 3,

mField: str = ‘’, mFlags = gm.GM_DensityFlags_DisableProgress, mKernelType = gm.GM_KernelType_Gaussian, mLayerDesc: str = ‘Density grid_test_GM_attrtibute’, mRadiusMeters: float = 6)

Parameters
  • mFlags (GM_DensityGridFlags_t32) – Flags for density grid generation

  • mKernelType (GM_DensityKernelType_t8) – The Kernel Type

  • mRadiusMeters (float) – Radius in meters for kernel (use 0 for a default)

  • mCellsPerRadius (int) – How many cells in each direction to have per radius (use 0 to use default of 3 cells in each direction per radius)

  • mLayerDesc (str) – Description to use for new layer, or NULL/empty for default

  • mField (str) – Name of attribute field to compute on. Set to NULL/empty string to just count points

  • mAreaUnits (GM_AreaUnits_t8) – Units of area measure

  • BoundingBox (Rectangle) – Bounding box in layer units. Provide empty box to use default of entire layer.

  • mBoundingBox (GM.Rectangle_t) –

class GM.ElevationOverrides_t(mOffset, mScale=1.0, mClampVals=True, mMinValid=False, mMinElev=0.0, mMaxValid=False, mMaxElev=0.0, mVoidValid=True, mElevUnits=0, mVoidElev=0.5, mLayerShader=None)[source]

Bases: globalmapper.GM_ElevationOverrides_t

This type represents any adjustments to apply to elevation values within a gridded elevation layer.

ElevationOverrides_t(mMaxElev: float, mMinElev: float, mOffset: float, mClampVals: bool = True,

mMaxValid: bool = True, mMinValid: bool = True, mVoidValid: bool = True, mLayerShader: str = None, mScale: float = 1.0, mVoidElev: float = 0.5)

Parameters
  • mOffset (float) – Offset to apply to elevations in meters

  • mScale (float) – Scale factor to apply

  • mClampVals (bool) – Clamp out of range values to specified min/max

  • mMinValid (bool) – Is the new minimum elevation valid

  • mMinElev (float) – Minimum valid elevation (meters)

  • mMaxValid (bool) – Is the new maximum elevation valid

  • mMaxElev (float) – Maximum valid elevation (meters)

  • mVoidValid (bool) – Is the void elevation value valid?

  • mElevUnits (GM_ElevUnits_t8) – Native elevation units for file.

  • mVoidElev (float) – Elevation to use for void values

  • mLayerShader (str) – Name of elevation shader to use for layer (NULL for default shared shader)

class GM.EqualValueAreaSetup_t(mFlags=1, mValAttrName='color', mAreaType=0, mColorDist=20, mElevDist=5, mSlopeDist=10, mBounds=(0.0, 0.0, 0.0, 0.0), mColorList=None, mColorListSize=0, mValAttrFormat=None, mLayerDesc='Equal Value area', mElevRangeHigh=0, mElevRangeLow=0)[source]

Bases: globalmapper.GM_EqualValueAreaSetup_t

This type is used to provide the parameters for performing Generate Areas from Equal Values process

EqualValueAreaSetup_t( mAreaType = gm.AFC_MIN, mBounds: Rectangle_t= Rectangle_t(), mColorDist: int = 20,

mColorList: int = None, mColorListSize: int = 30, mElevDist: float = 5, mFlags = gm.GM_EqualValueArea_ForceRGB, mLayerDesc: str = ‘Equal Value area’, mSlopeDist: float = 10, mValAttrFormat: str = None, mValAttrName: str = ‘color’)

Parameters
  • mFlags (GM_EqualValueAreaFlags_t32) – Flags controlling the operation

  • mValAttrName (str) – Name of attribute to save value (color/elev/slope) in

  • mAreaType (AreaFeatureClass_t16) – Area type to assign to area features

  • mColorDist (int, sint32) – Allowed fudge factor for colors

  • mElevDist (float) – Allowed difference for elevations

  • mSlopeDist (float) – Allowed difference for slopes

  • mBounds (Rectangle_t) – nBounds to create in (empty means all)

  • mColorList (COLORREF, int) – List of colors to consider (NULL for all)

  • mColorListSize (int) – Number of colors in the list of colors to consider

  • mValAttrFormat (str) – Formatting string to use for value attribute (NULL is default, can be C-style format string like “RGB( %d, %d, %d )” or “#%02X%02X%02X”). Must have 3 values for color, 1 for slope or elevation.

  • mLayerDesc (str) – Name of the resulting layer

  • mElevRangeHigh (float) – Maximum elevation

  • mElevRangeLow (float) – Minimum elevation

class GM.ExportOptsDXF_DWG_t(mTenPointFontHeight=10, mLabelType=1, mDWGVersion=0, mFlags=1, mCADType=0, mLayerAttr=None)[source]

Bases: globalmapper.GM_ExportOptsDXF_DWG_t

This type is used to describe custom export options for DXF/DWG vector exports

ExportOptsDXF_DWG_t( mDWGVersion = gm.GM_ExportDWG_VerDefault, mFlags = gm.GM_ExportDXF_UseLabelsForLayers,

mLabelType = gm.GM_ExportDXF_LabelsAsPointsFeatureLayer, mLayerAttr: str = None, mTenPointFontHeight: float = 10, mCADType = gm.GM_CADType_DWG)

Parameters
  • mTenPointFontHeight (float) – Height (in ground units) to use for 10 pt label fonts (other sizes will be scaled appropriately)

  • mLabelType (GM_ExportOptsDXFLabels_t8) – Export setting for area and line feature labels

  • mDWGVersion (GM_ExportOptsDWGVersion_t8) – DWG export only: version

  • mFlags (GM_ExportOptsDXFFlags_t32) – Export Flags

  • mCADType (GM_ExportOptsCADType_t8) – CAD export type (only used when passed into DWGExporter::Export())

  • mLayerAttr (str) – Attribute value to get layer name from (NULL to use description/type)

class GM.ExportOptsKML_t(mAreaOpacity=100, mAreaDisplayAtElev=False, mAreaElevsRelative=False, mExtrudeAreas=False, mLineDisplayAtElev=True, mLineElevsRelative=False, mHidePointsInitially=True)[source]

Bases: globalmapper.GM_ExportOptsKML_t

This type is used to describe custom export options for KML vector exports. To create a KMZ file, pass a filename with a .kmz extension to the GM_ExportVector function.

ExportOptsKML_t( mAreaDisplayAtElev: bool = False, mAreaElevsRelative: bool = False, mExtrudeAreas: bool = False,

mHidePointsInitially: bool = True, mLineDisplayAtElev: bool = True, mLineElevsRelativev: bool = False, mAreaOpacity: float = 100)

Parameters
  • mAreaOpacity (float) – area translucency - percent (0.0 - 100.0)

  • mAreaDisplayAtElev (bool) – display area features at feature elevation

  • mAreaElevsRelative (bool) – area elevations relative to ground (only valid if mAreaDisplayAtElev set)

  • mExtrudeAreas (bool) – extrude 3D areas to make 3D shapes like buildings (only valid if mAreaDisplayAtElev set)

  • mLineDisplayAtElev (bool) – display line features at feature elevation

  • mLineElevsRelative (bool) – line elevations relative to ground (only valid if mLineDisplayAtElev set)

  • mHidePointsInitially (bool) – initially hide point features when displayed in Google Earth

class GM.ExportOptsPDF_t(mFlags=1, mPageSizeName='Letter', mDPI=150, mMarginRect=(0.5, 1.0, 0.5, 0.5), mHeaderStr='Default obj value', mHeaderFont=None, mFooterStr=None, mFooterFont=None, mSymbolScale=0.0, mBorderStyle=0, mBorderWidth=3, mBorderColor=0)[source]

Bases: globalmapper.GM_ExportOptsPDF_t

Describes custom export options for DWG exports

ExportOptsPDF_t( mFlags = gm.GM_PDF_FillPage, mPageSizeName = ‘Letter’, mDPI = 150,

mMarginRect = Rectangle_t(0.5, 1.0, 0.5, 0.5), mHeaderStr: str = ‘Default obj value’, mHeaderFront = None, mFooterStr = None, mFooterFont = None, mSymbolScale = 0.0, mBorderStyle = gm.GM_PEN_SOLID, mBorderWidth = 3, mBordercolor = 0

Parameters
  • mFlags (GM_PDFExportFlags_t32) – Export flags

  • mPageSizeName (str) – Name of page size, like “Letter”, “Legal”, “A0”, etc.

  • mDPI (int, uint32) – Export DPI

  • mMarginRect (Rectangle) – Margins for each side in inches

  • mHeaderStr (str) – Header for page (None for none)

  • mHeaderFont (FontDef) – (const GM_FontDef_t) Header font (NULL for default)

  • mFooterStr (str) – Footer for page (None for none)

  • mFooterFont (FontDef) – Footer font (None for default)

  • mSymbolScale (float) – Point symbol scaling factor (0.0 will be treated as 1.0, use 2.0 to double size, 0.5 to half size, etc.)

  • mBorderStyle (GM_PenStyle_t16) – Border pen style (i.e. solid, dash, etc.)

  • mBorderWidth (int, uint16) – Border width in PDF points (pixels)

  • mBorderColor (color, int) – Border line color

class GM.ExportOptsSHP_t(mAddLabelAttr=True, mAddLayerAttr=True)[source]

Bases: globalmapper.GM_ExportOptsSHP_t

This type is used to describe custom export options for Shapefile vector exports

ExportOptsSHP_t( mAddLabelAttr = True, mAddLayerAttr = True)

Parameters
  • mAddLabelAttr (bool) – Include the display label as a LABEL attribute if present

  • mAddLayerAttr (bool) – Add LAYER and GM_TYPE attribute values

class GM.ExportOptsSimpleText_t(mCoordSep=None, mFeatureSep=None, mAddStyleAttrs=True, mYCoordFirst=True, mReserved1=0, mReserved2=0)[source]

Bases: globalmapper.GM_ExportOptsSimpleText_t

This type is used to describe custom export options for Simple Text vector exports

ExportOptsSimpleText_t(mCoordSep: str = None, mFeatureSep: str = None, mAddLayerAttr: bool = True, mYCoordFirst: bool = True,

mReserved1: bytes = 0, mReserved2: bytes = 0)

Parameters
  • mCoordSep (str) – Coordinate separator (use None for default of comma)

  • mFeatureSepFeature (str) – separator (use None for default of blank line)

  • mAddStyleAttrs (bool) – Include style attributes if attributes are included

  • mYCoordFirst (bool) – Export Y/latitude/northing before X/longitude/easting

  • mReserved1 (int, uint8) – Reserved (for padding), must be 0

  • mReserved2: – int: Reserved (for padding), must be 0

  • uint8 – Reserved (for padding), must be 0

  • mFeatureSep (str) –

  • mReserved2 (int) –

class GM.ExportOptsGeoPackage_t(mOverwriteExisting=False, mAreaTableName=None, mLineTableName=None, mPointTableName=None, mSplitByLayer=False, mGen3dFeatures=False, mTileTableName=None, mDescription='Default Tile Layer', mMaxZoomLevel=3, mNumZoomLevels=5, mImageFormat=0, mImageQuality=75, mTileSize=256, mFlags=1)[source]

Bases: globalmapper.GM_ExportOptsGeoPackage_t

This type is used to describe custom export options for GeoPackage exports

ExportOptsGeoPackage_t(mOverwriteExisting: bool = False, mAreaTableName: str = None,

mLineTableName: str = None, mPointTableName: str = None, mSplitByLayer: bool = False, mGen3dFeatures: bool = False, mTileTableName: str = None, mDescription: str = ‘Default Tile Layer’, mMaxZoomLevel: int = 3, mNumZoomLevels:int = 5, mImageFormat: int = gm.GM_Export_GeoTIFF, mImageQuality: int = 75, mTileSize: int = 256, mFlags = gm.GM_WebExport_NoTransparency)

Parameters
  • mOverwriteExisting (bool) – Indicates whether or not to overwrite an existing GeoPackage file

  • mAreaTableName (string) – Table name for area features. NULL if not exporting areas. For Vector Export.

  • mLineTableName (string) – Table name for line features. NULL if not exporting lines. For Vector Export.

  • mPointTableName (string) – Table name for point features. NULL if not exporting points. For Vector Export.

  • mSplitByLayer (bool) – Indicates whether or not to split features in to separate tables by layer. For Vector Export.

  • mGen3dFeatures (bool) – Indicates whether or not to create 3D features. For Vector Export.

  • mTileTableName (String) – Table name for raster tiles. NULL for default “tile_data”. For Raster Export.

  • mDescription (String) – Description for tile layer. For Raster Export.

  • mMaxZoomLevel (int, sint32) – Maximum zoom level to export. Valid range is 3 to 22. For Raster Export.

  • mNumZoomLevels (int, uint32) – Total number of zoom levels to export. For Raster Export.

  • mImageFormat (GM_RasterExportFormat_t32) – Image format (PNG or JPEG). For Raster Export.

  • mImageQuality (int, uint32) – Image quality. Applies only to JPEG exports. Range is 1 to 100. Default is 75. For Raster Export.

  • mTileSize (int, uint32) – Tile size in pixels. Valid values are 256, 512, and 1024. Default is 256. Tiles are square, so 256 means 256 x 256 pixel tiles. For Raster Export.

  • mFlags (GM_WebExportFlags_t32) – Additional related for skipping empty tiles, skipping tiles that already exist, etc. For Raster Export.

class GM.FeatureClassInfo_t(mIsEnabled=False, mPriority=1, mZLevel=0, mDesc=None)[source]

Bases: globalmapper.GM_FeatureClassInfo_t

This type is used to return information about a given feature classification

FeatureClassInfo_t( mIsEnabled: bool = False, mPriority: bool = False, mZLevel = gm.Z_LVL_MIN, mDesc: str = None)

Parameters
  • mIsEnabled (bool) – Is display of this class enabled?

  • mPriority (bool) – Draw priority (0-255). Controls when features show up in zoom levels.

  • mZLevel (ZLevel_t16) – Z level for feature

  • mDesc (str) – Description string for this feature

class GM.FillGapsParams_t(mGridAlg, mGapAlg, mDirsToRequire, mMaxThreads=0, mMaxDist=0, mMinDist=0, mMaxPointCount=5, mPowerParameter=5)[source]

Bases: globalmapper.GM_FillGapsParams_t

Structure defining parameters for gap filling

FillGapsParams_t( mGridAlg = gm.GM_GridAlg_None, mGapAlg = gm.GM_GapFillAlg_None, mDirsToRequire: int = 4,

mMaxThreads: int = 4, mMaxDist: int = 10, mMinDist: int = 1, mMaxPointCount: int = 5, mPowerParameter: int = 5)

Parameters
  • mGridAlg (GM_GridAlg_t8) – Algorithm to used for creating elevation grid (used for creating pyramid grids)

  • mGapAlg (GM_GridGapFillAlg_t8) – Algorithm to use for filling gaps

  • mDirsToRequire (int, uint32) – how many cardinal directions to require (4 for all 4)

  • mMaxThreads (int, uint32) – maximum background threads to spawn (0 for default)

  • mMaxDist (int, uint32) – maximum distance (in samples) from center to search

  • mMinDist (int, uint32) – minimum distance (in samples) from center to search

  • mMaxPointCount (int, uint32) – maximum number of points to consider (0 for no maximum)

  • mPowerParameter (int, uint32) – the power parameter to use in IDW calculations

class GM.GPS_Position_t(lat=0, lon=0)[source]

Bases: globalmapper.GM_GPS_Position_t

Structure for holding GPS position

Parameters
  • mLat (float) – Latitude mLon:float Longitude

  • lat (float) –

  • lon (float) –

class GM.GPS_Waypoint_t(mPos={'mLat': 0.0, 'mLon': 0.0}, mAltitude=0, mName='', mGroupId=0, mIcon=0, mSerialCode=0)[source]

Bases: globalmapper.GM_GPS_Waypoint_t

Structure for holding GPS waypoint information

Parameters
  • mPos (GM_GPS_Position_t) – Current location (lat/lon radians)

  • mAltitude (float) – Altitude above sea level in meters

  • mName (str) – Waypoint name

  • mGroupId (int) – Group ID (0 - 99)

  • mIcon (int) – Icon (0-99)

  • mSerialCode (int) – Serial code of sender

  • mTimeStamp (time_t) – UTC time of waypoint creation

class GM.GPS_Text_Msg_t(mDeviceName='', mMessage='', mGroupId=0, mIcon=0, mSerialCode=0)[source]

Bases: globalmapper.GM_GPS_Text_Msg_t

Structure for holding GPS text message information

Parameters
  • mDeviceName (str) – Sending device name

  • mMessage (str) – Message

  • mGroupID (int) – Group ID (0 - 99)

  • mIcon (int) – Icon (0-99)

  • mSerialCode (int) – Serial code of sender

  • mTimeStamp (time_t) – UTC time of message transmission

  • mGroupId (int) –

class GM.GridCombineSetup_t(mCombineOp, mLayer1, mLayer2, mRectBounds=(0.0, 0.0, 0.0, 0.0), mXRes=0.0, mYRes=0.0, mDesc='Grid setup description', mFlags=1, mElevUnits=0, mCompareVal=1.5)[source]

Bases: globalmapper.GM_GridCombineSetup_t

This type represents the input needed for creating a new grid layer by combining 2 input grid layers

GridCombineSetup_t(mCombineOp, mLayer1, mLayer2, mRectBounds: Rectangle_t = Rectangle_t(), mXRes: float = 0.0,

mYRes: float = 0.0,mDesc: str = ‘Grid setup description’, mFlags = gm.GM_CombineOp_FillGaps, mElevUnits = gm.GM_ElevUnit_Meters, mCompareVal: float = 1.5)

Parameters
  • mCombineOp (GM_CombineOp_t8) – Combine operation

  • mLayer1 (GM_LayerHandle_t32) – First input grid layer

  • mLayer2 (GM_LayerHandle_t32) – Second input grid layer

  • mRectBounds (Rectangle_t) – Bounding rectangle in current projection in which to perform operation. Keep at null rectangle (all zero values) to use default of intersection of input grid layers.

  • mXRes (float) – X resolution (in current proj units) to generate grid at (use 0.0 for auto-spacing determination)

  • mYRes (float) – Y resolution (in current proj units) to generate grid at (use 0.0 for auto-spacing determination)

  • mDesc (str) – Grid description

  • mFlags (GM_CombineOpFlags_t32) – Flags to control operation

  • mElevUnits (GM_ElevUnits_t8) – Elevation units for new grid layer

  • mCompareVal (float) – Compare value to use for operations that compare to a value

class GM.GridGenSetup_t(mDesc=None, mFlags=1, mXRes=0.0, mYRes=0.0, mElevUnits=2, mGridAlg=1, mLidarField=0, mBandType=0, mLidarBreaklineBinMult=2, mBounds=(0.0, 0.0, 0.0, 0.0), mTightnessMult=1.005, mGridBinMult=0, mTaperValue=0.0, mGapFillSetup=None)[source]

Bases: globalmapper.GM_GridGenSetup_t

Object containing the inputs needed for gridding a set of vector data

GridGenSetup_t(mDesc = None, mFlags = gm.GM_GridGen_NoConstraints, mXRes = 0.0, mYRes = 0.0,

mElevUnits = gm.GM_PRJ_UNIT_METERS, mGridAlg = gm.GM_GridAlg_DefaultLidar, mLidarField = gm.GM_LidarGrid_Elevation, mBandType = gm.GM_VAL_U8,mLidarBreaklineBinMult = 2, mBounds = None, mTightnessMult = gm.GM_GRID_DISABLE_GAP_FILL, mTaperValue = 0.0, mGapFillSetup = None)

Parameters
  • mDesc (str) – Grid description

  • mFlags (GM_GridGenFlags_t32) – Flags for grid generation

  • mXRes (float) – X resolution (in current proj units) to generate grid at (use 0.0 for auto-spacing determination)

  • mYRes (float) – Y resolution (in current proj units) to generate grid at (use 0.0 for auto-spacing determination)

  • mElevUnits (UNIT) – Units to generate grid at (elevation values in other units will be converted as needed)

  • mGridAlg (GM_GridAlg_t8) – Algorithm to use for creating elevation grid (if any)

  • mLidarField (GM_LidarGridField_t8) – Field of Lidar data to grid if gridding Lidar point clouds

  • mBandType (str) – Band type to use for non-elevation gridding

  • mLidarBreaklineBinMult (GM_LidarGridField_t8) – Number of cells to clear from a Lidar grid around 3D breaklines before applying breakline heights and filling gaps (valid if GM_GridGen_ApplyLidarBreaklines used). Typically in range 1-4.

  • mBounds (Rectangle_t) – (GM_Rectangle_t)Bounding box to grid to in current proj units. Pass NULL to use the combined bounds of all input layers (the default).

  • mTightnessMult (float) – Grid tightness multiplier (multiplies resolution) for discarding values far from a sample. Default of zero discards nothing. For Lidar bin gridding you typically do NOT want to use 0 as it it can be very slow to fill all gaps in irregular Lidar data. Use GM_GRID_DISABLE_GAP_FILL to disable gap filling altogether. For Lidar bin grids, gap fill values in the range 1-32 are common.

  • mGridBinMult (float) – Grid bin multiplier for use if using a bin-based grid method. This is multiple of calculated point density.

  • mTaperValue (float) – Taper value for gridding areas. 0.0 for no taper (default)

  • mGapFillSetup (FillGapsParams_t) – Parameters to perform gap fill operations. Use NULL for default parameters.

class GM.GridLayout_t(mFlags=1, mTopLeft=(0.0, 0.0), mXSpacing=1.005, mYSpacing=2.005, mNumSamplesX=100, mNumSamplesY=100, mBytesPerRow=256, mNoDataValue=1.0, mValType=0, mElevUnits=0, mReserved=0)[source]

Bases: globalmapper.GM_GridLayout_t

This type represents layout information for a new elevation grid layer

GridLayout_t( mFlags = gm.GM_RasterLayout_BGROrder, mTopLeft: Point_t = Point_t(0,0), mXSpacing: float = 1.005,

mYSpacing: float = 2.005, mNumSamplesX: int = 100, mNumSamplesY: int = 100, mBytesPerRow: int = 256, mNoDataValue: float = 1.00, mValType = gm.GM_VAL_U8, mElevUnits = gm.GM_ElevUnit_Meters, mReserved = 0)

Parameters
  • mFlags (GM_RasterLayoutFlags_t32) – General flags for layout.

  • mTopLeft (Point_t) – Ground coordinates of center of the top left pixel

  • mXSpacing (float) – Spacing of sample cells in the X direction

  • mYSpacing (float) – Spacing of sample cells in the Y direction

  • mNumSamplesX (int, sint32) – Number of pixels in the x direction

  • mNumSamplesY (int, sint32) – Number of pixels in the y direction

  • mBytesPerRow (int, uint32) – Number of bytes per row of data in data buffer. If 0 this will be calculated for you.

  • mNoDataValue (float) – Value of samples for which the value isn’t known (i.e. -9999.9)

  • mValType (GM_BandValType_t8) – Band value type

  • mElevUnits (GM_ElevUnits_t8) – Elevation units

  • mReserved (int, uint8) – Reserved for alignment purposes

class GM.ProjAttrValue_t(mAttr=3, mValue=0.0)[source]

Bases: globalmapper.GM_ProjAttrValue_t

This type is used to describe a single projection attribute value

ProjAttrValue_t( mAttr = gm.CENTRAL_LONGITUDE, mValue = 0.0)

Parameters
  • mAttr (PROJATTR) – Attribute

  • mValue (float) – Attribute value

class GM.Projection_t(mProjSys=0, mDatum=23, mUnit=2, mAttrList=(0, 0.0), mNumAttrs=0)[source]

Bases: globalmapper.GM_Projection_t

This type is used to fully describe a projection.

Projection_t(mProjSys: int = gm.GM_PRJ_GEO, mDatum: int = gm.GM_DATUM_WGS_84,

mUnit: int = gm.GM_PRJ_UNIT_METERS, mAttrList=None)

Parameters
  • mProjSys (PROJSYS, int) – Projection system

  • mDatum (DATUM, int) – Horizontal datum

  • mUnit (UNIT, int) – Ground units

  • mNumAttrs (int) – Size of mAttrList

  • mAttrList (GM_ProjAttrValue_t) – Attribute value list items

class GM.LayerInfo_t(mDescription=None, mNativeRect=(0.0, 0.0, 0.0, 0.0), mGlobalRect=(0.0, 0.0, 0.0, 0.0), mPixelWidth=1920, mPixelHeight=1080, mNativeProj={'mAttrList': [(0, 0.0), (120, - 2.535912352140187e-212), (257, 1.3007834198716e-311), (0, - 1.504640500975244e-309), (0, 0.0), (108, - 1.510072809552523e-309), (24909, 8.011006055295103e-307), (111, - 1.51020012865235e-309), (29263, 8.011006054610738e-307), (111, - 1.520937426707043e-309), (1464, 1.302659432577e-311), (111, - 1.523207966736477e-309), (0, 0.0), (42000, - 4.045490622385726e-270), (49392, 2.1219957915e-314), (11824, - 3.876556535066773e-217)], 'mDatum': 23, 'mNumAttrs': 0, 'mProjSys': 0, 'mUnit': 2}, mControlPoints=None, mNumGCPs=0, mMinElevation=0.0, mMaxElevation=10.0, mNumAreas=1, mNumLines=1, mNumPoints=0, mPixelSizeX=0.5, mPixelSizeY=0.5, mHasRasterData=False, mEnabled=False, mHasVectorData=False, mUsedDefaultPos=False, mFilename=None, mArchiveFilename=None, mTypeName=None, mGlobalPixelWidth=1920, mGlobalPixelHeight=1080, mMetadataList=None, mMetadataListSize=0, mNumBands=1, mExtraLoadFlags=None, mPalette=None, mPaletteSize=0, mUserData=1, mElevUnits=0, mBandValType=0, mBandBitDepth=32, mRasterTypeFlags=1, mUserText=None, mNumLidarPoints=0, mParentLayer=0, mDfltViewGlobal=(0.0, 0.0, 0.0, 0.0), mCodePage=0, mGroupName=None, mUsedDefaultProj=False, mLayerFlags=0)[source]

Bases: globalmapper.GM_LayerInfo_t

This type is used when returning information about a layer

LayerInfo_t( mDescription: str = None, mNativeRect: Rectangle_t = Rectangle_t(),

mGlobalRect: Rectangle_t = Rectangle_t(), mPixelWidth: int = 1920, mPixelHeight: int = 1080, mNativeProj: Projection_t = Projection_t(), mControlPoints: gm.GM_GroundControlPoint_array = None, mNumGCPs: int = 0, mMinElevation: float = 0.0, mMaxElevation: float = 10.0, mNumAreas: int = 1, mNumLines: int = 1, mNumPoints: int = 0, mPixelSizeX: float = 0.5, mPixelSizeY: float = 0.5, mHasRasterData: bool = False, mEnabled: bool = False, mHasVectorData: bool = False, mUsedDefaultPos: bool = False, mFilename: str = None,mArchiveFilename: str = None, mTypeName: str = None, mGlobalPixelWidth: int = 1920, mGlobalPixelHeight: int = 1080, mMetadataList: gm.GM_AttrValue_array = None, mMetadataListSize: int = 0, mNumBands: int = 1, mExtraLoadFlags: str = None, mPalette: gm.GM_PaletteEntry_array = None, mPaletteSize: int = 0, mUserData: int = 1, mElevUnits=gm.GM_ElevUnit_Meters,mBandValType=gm.GM_VAL_U8, mBandBitDepth: int = 32, mRasterTypeFlags=gm.GM_RasterType_Image, mUserText: str = None, mNumLidarPoints: int = 0, mParentLayer:LayerHandle_t = LayerHandle_t(0), mDfltViewGlobal: Rectangle_t = Rectangle_t(), mCodePage: int = 0, mGroupName: str = None, mUsedDefaultProj: bool = False, mLayerFlags=gm.GM_LayerFlags_Default)

Parameters
  • mFilename (str) – Filename from which layer was loaded (if this is an archive file, like .zip, then the name of the actual loaded file will be in mArchiveFilename

  • mParentLayer (GM_LayerHandle_t32) – Handle to parent layer if this is a child (i.e. from catalog or online layer). NULL for all top-level layers.

  • mDescription (str) – Description string

  • mNativeRect (Rectangle_t) – Bounding rect of layer in native coordinates

  • mGlobalRect (Rectangle_t) – Bounding rect of layer in global coordinates

  • mPixelWidth (int, uint32) – RASTER/ELEV ONLY: Number of pixels wide layer is (should be an unsigned integer)

  • mPixelHeight (int, uint32) – RASTER/ELEV ONLY: Number of pixels tall layer is (should be an unsigned integer)

  • mNativeProj (Projection_t) – Native projection of layer

  • mControlPoints (GroundControlPoint_array) – Ground control points list. Point to GM_GroundControlPoint_t

  • mNumGCPs (int, uint32) – RASTER ONLY: Number of ground control points in list

  • mMinElevation (float) – ELEV ONLY: Minimum elevation in meters

  • mMaxElevation (float) – ELEV ONLY: Maximum elevation in meters

  • mNumAreas (int, uint32) – VECTOR ONLY: Number of area features (should be an unsigned integer)

  • mNumLines (int, uint32) – VECTOR ONLY: Number of line features (should be an unsigned integer)

  • mNumPoints (int, uint32) – VECTOR ONLY: Number of point features (should be an unsigned integer)

  • mPixelSizeX (float) – RASTER/ELEV ONLY: Pixel size in meters in the x direction

  • mPixelSizeY (float) – RASTER/ELEV ONLY: Pixel size in meters in the y direction

  • mHasRasterData (bool) – Does this layer have raster or elevation data?

  • mEnabled (bool) – Is this layer enabled for display or it it hidden?

  • mHasVectorData (bool) – Does this layer have vector data (the features counts can all be 0 for things like map catalogs)

  • mUsedDefaultPos (bool) – RASTER/ELEV ONLY: Was the default position used for this layer since the file could not be automatically positioned?

  • mArchiveFilename (str) – Filename within archive file (e.g. .zip or .tar.gz) from which layer was loaded, if any (might be None)

  • mTypeName (str) – Layer type name

  • mGlobalPixelHeight (int) – RASTER/ELEV ONLY: Approximate number of pixels required in height for a 1:1 pixel mapping in the current projection (should be an unsigned integer)

  • mGlobalPixelWidth (int) – RASTER/ELEV ONLY: Approximate number of pixels required in width for a 1:1 pixel mapping in the current projection (should be an unsigned integer)

  • mMetadataList (AttrValue_t) – List of metadata attributes and values for the layer

  • mMetadataListSize (int) – List of metadata attributes and values for the layer

  • mNumBands (int) – Number of bands in a raster image (use GM_SetRasterDisplayOptions to change color band layout) (should be an unsigned integer)

  • mExtraLoadFlags (str) – Additional load flags with options selected by user during load. Pass these to GM_LoadLayerListEx to remember options.

  • mPalette (PaletteEntry_array) – List of palette entries for palette-based raster layer

  • mPaletteSize (int, uint32) – Number of entries in palette list

  • mUserData (intPtr) – Custom data associated with layer provided by user via GM_SetLayerUserData function

  • mElevUnits (GM_ElevUnits_t8) – Elevation units for layer

  • mBandValType (GM_BandValType_t8) – RASTER/ELEV ONLY: type of data for the bands

  • mBandBitDepth (int, uint16) – RASTER/ELEV ONLY: number of bits per band value. Multiply by mNumBands to get total bit depth per sample.

  • mRasterTypeFlags (GM_RasterTypeFlags_t32) – Raster type flags, specifies what type of data a raster layer actually contains

  • mUserText (str) – Custom text string associated with layer provided by user via GM_SetLayerUserText function or loaded form workspace.

  • mNumLidarPoints (int, uint64) – VECTOR ONLY: Number of Lidar point cloud points (fetch with GM_GetLidarPoint) (Should be an unsigned integer)

  • mDfltViewGlobal (Rectangle_t) – Default view bounding rect of layer in global coordinates (usually same as mGlobalRect)

  • mCodePage (int, sint32) – Code page for text in layer. 0 is default and current active code page (CP_ACP). CP_UTF8 is for UTF-8 interpretation.

  • mGroupName (str) – Group name that the layer is in. NULL for no group. Separated with <sep> if multiple levels.

  • mUsedDefaultProj (boolean) – Was the default projection used for this layer since a projection for the file could not be automatically determined?

  • mLayerFlags (GM_LayerFlags_t32) – Extra flags for the layer

class GM.LineStyle_t(mPenStyle=0, mPenWidth=0, mPenColor=0, mDrawLabel=True, mDrawLabelAlways=False, mDrawLabelOnLine=False, mExtraStyleData=0, mFont={'mAngle': 0.0, 'mBgMode': 1, 'mCharset': 255, 'mColor': 0, 'mFaceName': 'System', 'mFixedHgt': 0.0, 'mHalo': 1, 'mItalicize': 0, 'mPlacement': 0, 'mPointSize': 0, 'mReserved2': 0, 'mReserved3': 0, 'mStrikeout': 0, 'mUnderline': 0, 'mWeight': 10}, mLabelSegment=0, mFixedWidthMeters=0.5, mBgPenWidth=0, mBgPenColor=0)[source]

Bases: globalmapper.GM_LineStyle_t

This type is used to describe a style used for drawing a line feature and its label (if any)

LineStyle_t(mPenStyle=gm.GM_PEN_SOLID, mPenWidth: int = 0, mPenColor: COLORREF = COLORREF(0),

mDrawLabel: bool = True, mDrawLabelAlways: bool = False, mDrawLabelOnLine: bool = False, mExtraStyleData: int = 0, mFont: FontDef_t = FontDef_t(), mLabelSegment: int = 0, mFixedWidthMeters: float = 0.5, mBgPenWidth: int = 0,mBgPenColor: int = int(0))

Parameters
  • mPenStyle (GM_PenStyle_t16) – Pen style (i.e. solid, dash, etc.)

  • mPenWidth (int, uint16) – Width in pixels to draw pen in (set to 0 for fixed width lines)

  • mPenColor (COLORREF) – Color to use for pen

  • mDrawLabel (bool) – Render the label for this line if there is one

  • mDrawLabelAlways (bool) – Render the label for this line even if it collides with another display label

  • mDrawLabelOnLine (bool) – Render the label for this line (if any) directly on the line rather than offset from it

  • mExtraStyleData (int, uint8) – Extra parameter for some styles(i.e.scallop height for scallop line styles). Set to 0 for default behavior.

  • mFont (FontDef_t) – Font to use to render label

  • mLabelSegment (int, sint32) – Segment number (1-based) on which to render label (use 0 to use default label placement)

  • mFixedWidthMeters (float) – Fixed width in meters to use for pen (only used if mPenWidth is zero)

  • mBgPenWidth (int,uint16) – For double line pens, the width of the background line; if bg width is > 0, then this is a double line style

  • mBgPenColor (COLORREF) – For double line pens, the color of the background line

class GM.LineFeature_t(mFeatureInfo={'mAttrList': {'mName': 'Name1', 'mVal': 'Val1'}, 'mClass': 0, 'mDesc': None, 'mName': None, 'mNumAttrs': 2}, mPointList=<globalmapper.GM_Point_t_array; proxy of <Swig Object of type 'GM_Point_t_array *'> >, mNumPoints=2, mLineStyle={'mBgPenColor': 0, 'mBgPenWidth': 0, 'mDrawLabel': 1, 'mDrawLabelAlways': 0, 'mDrawLabelOnLine': 0, 'mExtraStyleData': 0, 'mFixedWidthMeters': 0.5, 'mFont': {'mAngle': 0.0, 'mBgMode': 1, 'mCharset': 255, 'mColor': 0, 'mFaceName': 'System', 'mFixedHgt': 0.0, 'mHalo': 1, 'mItalicize': 0, 'mPlacement': 0, 'mPointSize': 0, 'mReserved2': 0, 'mReserved3': 0, 'mStrikeout': 0, 'mUnderline': 0, 'mWeight': 10}, 'mLabelSegment': 0, 'mPenColor': 0, 'mPenStyle': 0, 'mPenWidth': 0}, mVertexElevList=<globalmapper.float_array; proxy of <Swig Object of type 'float_array *'> >)[source]

Bases: globalmapper.GM_LineFeature_t

A Managed Definition of a Line Feature

LineFeature_t(mFeatureInfo: VectorFeature_t = VectorFeature_t(),

mPointList: gm.GM_Point_t_array = array([Point_t(0, 0), Point_t(0, 1)]),mNumPoints=2, mLineStyle: LineStyle_t = LineStyle_t(), mVertexElevList: gm.float_array = array([1.05, 2.05]))

Parameters
  • mFeatureInfo (VectorFeature_t) – List of attributes associated with feature (pointer to GM_AttrValueCharPtr_t/GM_AttrValueIntPtr_t array) (Read-Only use the SetAttrList() member function to set new list)

  • mPointList (Point_t) – List of points that make up the line (global coordinates when getting, native when adding feature)

  • mNumPoints (int) – (No SDK desciption)

  • mLineStyle (LineStyle_t) – Line render style (symbol and font)

  • mVertexElevList (float_array) – Optional list of elevations for each point in line. If present, must have mNumPoints values

class GM.LineVolumeParams_t(mSize=0, mPoints=<globalmapper.GM_Point_t_array; proxy of <Swig Object of type 'GM_Point_t_array *'> >, mCutHeights=<globalmapper.float_array; proxy of <Swig Object of type 'float_array *'> >, mNumPoints=2, mCutHeightsAbsolute=False, mCorridorWidth=2.5, mXSpacing=0.0, mYSpacing=0.0)[source]

Bases: globalmapper.GM_LineVolumeParams_t

This type is used to provide the parameters for calculating cut-and-fill volumes along a line feature

LineVolumeParams_t(mSize: int = 0, mPoints: gm.GM_Point_t_array = array([Point_t(0, 0), Point_t(0, 1)]),

mCutHeights: gm.float_array = array([1.00, 2.00]),mNumPoints: int = 2, mCutHeightsAbsolute: bool = False, mCorridorWidth: float = 2.5, mXSpacing: float = 0.0, mYSpacing: float = 0.0)

Parameters
  • mSize (int, uint32) – Size of structure

  • mPoints (Point_t_array) – List of points in line in global coordinate system

  • mCutHeights (float_array) – Cut heights for each point in meters

  • mNumPoints (int, uint32) – Number of points in mPoints and mCutHeights

  • bool (mCutHeightsAbsoluteL) – Are the cut heights in mCutHeights relative to sea level (TRUE) or ground level (FALSE)

  • mCorridorWidth (float) – Width (i.e. diameter) in meters of corridor around line in which to calculate volume

  • mXSpacing (float) – Sample spacing in the x direction in global units

  • mYSpacing (float) – Sample spacing in the y direction in global units

  • mCutHeightsAbsolute (bool) –

class GM.MapCatalogInfo_t(mSize=0, mNumMaps=1, mHideBounds=False, mDisplayType=0, mReserved=None, mDisplayValue=1.001, mDisplayValue2=2.005)[source]

Bases: globalmapper.GM_MapCatalogInfo_t

This type represents information about a map catalog. Use GM_GetLayerInfo for more generic information, like bounds.

MapCatalogInfo_t(mSize: int = 0, mNumMaps: int =1, mHideBounds: bool = False, mDisplayType = gm.GM_MapCatalog_DisplayTypePercent , mReserved: int = None, mDisplayValue: float = 1.001, mDisplayValue2: float = 2.005)

Parameters
  • mSize (int, uint32) – Size of structure

  • mHideBounds (bool) – Hide layer bounds when not drawing data

  • mDisplayType (GM_MapCatalogDisplayType_t8) – Controls when layers in catalog are displayed

  • mDisplayValue (float) – First value related to display type

  • mDisplayValue2 (float) – Second value for range of scales

  • mNumMaps (int, uint32) – mNumber of maps in catalog.

  • mReserved (int, uint8) – Reserved for future use, must be 0

class GM.PathProfileLOSParams_t(mSize=0, mFlags=1, mStartX=0, mStartY=0, mEndX=0, mEndY=0, mElevList=<globalmapper.float_array; proxy of <Swig Object of type 'float_array *'> >, mListSize=2, mDfltElev=1, mDetailsStr=None, mDetailsStrMaxLen=256, mAtmosphericCorr=1.3333, mLOSFromHeight=1, mLOSToHeight=5, mLOSMinClearance=0.0, mLOSMinClearancePos=(3.0, 3.0), mFresnelFreq=0.0, mFresnelPctClear=0.6, mLOSFirstBlockedPos=(0.0, 1.0), mLOSLastBlockedPos=(2.0, 2.0))[source]

Bases: globalmapper.GM_PathProfileLOSParams_t

This type is used to provide the parameters for calculating path profiles and performing line of sight analysis

PathProfileLOSParams_t(mSize: int, mFlags:int, mStartX: float, mStartY: float, mEndX: float, mEndY: float,

mElevList: gm.float_array = array([3.25, 4.125]), mListSize: int = 2, mDfltElev: float = 1, mDetailsStr: str = None, mDetailsStrMaxLen: int = 256, mAtmosphericCorr: float = 1.3333, mLOSFromHeight: float = 1, mLOSToHeight: float = 5,mLOSMinClearance: float = 0.0, mLOSMinClearancePos=Point_t(3, 3), mFresnelFreq: float = 0.0, mFresnelPctClear: float = 0.6, mLOSFirstBlockedPos: Point_t = Point_t(0, 1), mLOSLastBlockedPos: Point_t = Point_t(2, 2))

Parameters
  • mSize (int, uint32) – IN: Size of structure

  • mFlags (GM_PathProfileLOSFlags_t32) – IN: Flags controlling behavior

  • mStartX (float) – IN: Start X coord in current projection

  • mStartY (float) – IN: Start Y coord in current projection

  • mEndX (float) – IN: End X coord in current projection

  • mEndY (float) – IN: End Y coord in current projection

  • mElevList (float_array) – OUT: List of Elevations.

  • mListSize (int, uint32) – IN: Number of elevations to retrieve

  • mDfltElev (float) – IN: Elev to use when none could be found

  • mDetailsStr (str) – String containing path details (set to NULL if you don’t care)

  • mDetailsStrMaxLen (int, uint32) – IN: Maximum length of details string

  • mAtmosphericCorr (float) – IN: Atmospheric correction for LOS (1.3333 is standard for radio waves, 1.0 is no correction)

  • mLOSFromHeight (float) – IN: Line-of-sight from height in meters

  • mLOSToHeight (float) – IN: Line-of-sight to height in meters

  • mLOSMinClearance (float) – OUT: Minimum line-of-sight clearance in meters (will be negative if the line of sight is not clear)

  • mLOSMinClearancePos (Point_t) – OUT: Location of minimum line-of-sight clearance

  • mFresnelFreq (float) – IN: Frequency (in GHz) to use for testing clearance of first Fresnel zone (use 0.0 to not do Fresnel testing)

  • mFresnelPctClear (float) – IN: Percentage of first Fresnel zone that must be clear of obstacles (use 0.6 for 60%). If 0 is specified, the default of 60% is used.

  • mLOSFirstBlockedPos (Point_t) – OUT: Location of first blocked location along path (only valid if mLOSMinClearance is negative)

  • mLOSLastBlockedPos (Point_t) – OUT: Location of last blocked location along path (only valid if mLOSMinClearance is negative)

class GM.PixelRect_t(mLeft=0, mRight=0, mTop=0, mBottom=0)[source]

Bases: globalmapper.GM_PixelRect_t

This type describes a bounding rectangle in pixel coordinates

PixelRect_t(mBottom: int = 0, mLeft: int = 0, mRight: int = 0, mTop: int = 0)

Parameters
  • mBottom (int, sint32) – Bottom coordinate of rectangle

  • mLeft (int, sint32) – Left coordinate of rectangle

  • mRight (int, sint32) – Right coordinate of rectangle

  • mTop (int, sint32) – Top coordinate of rectangle

class GM.Point3D_t(mX=0, mY=0, mElev=0)[source]

Bases: globalmapper.GM_Point3D_t

Structure for holding a 3D Point Point3D_t(mX: float=0, mY: float=0, mElev: float=0)

Parameters
  • mX (float) – x coordinate

  • mY (float) – y coordinate

  • mElev (float) – Elevation value

class GM.PointStyle_t(mSymbolName='Dot', mFont={'mAngle': 0.0, 'mBgMode': 1, 'mCharset': 255, 'mColor': 0, 'mFaceName': 'System', 'mFixedHgt': 0.0, 'mHalo': 1, 'mItalicize': 0, 'mPlacement': 0, 'mPointSize': 0, 'mReserved2': 0, 'mReserved3': 0, 'mStrikeout': 0, 'mUnderline': 0, 'mWeight': 10}, mDrawLabel=True, mDrawLabelAlways=True, mRotation=0, mScale=- 10)[source]

Bases: globalmapper.GM_PointStyle_t

This type is used to describe a style used for drawing a point feature and its label (if any)

PointStyle_t(mSymbolName: str=’Dot’, mFont: FontDef_t = FontDef_t(), mDrawLabel: bool = True,

mDrawLabelAlways: bool = True, mRotation: int = 0, mScale: float = -10)

Parameters
  • mSymbolName (str) – Name of symbol

  • mFont (FontDef_t) – Font to use to render label

  • mDrawLabel (bool) – Render the label for this line if there is one

  • mDrawLabelAlways (bool) – Render the label for this line even if it collides with another display label

  • mRotation (int, uint32) – rotation angle in degrees (0 is up/north, 90 right/east, etc.) OR’d with rotation sense flags (GM_RotationSense_t16)

  • mScale (float) – Symbol scaling factor to apply (use negative values to make symbol a fixed height in meters, i.e. -10 would make symbol 10 meters high)

class GM.PointFeature_t(mFeatureInfo={'mAttrList': {'mName': 'Name1', 'mVal': 'Val1'}, 'mClass': 0, 'mDesc': None, 'mName': None, 'mNumAttrs': 2}, mPos=(0.0, 0.0), mPointStyle={'mDrawLabel': 1, 'mDrawLabelAlways': 1, 'mFont': {'mAngle': 0.0, 'mBgMode': 1, 'mCharset': 255, 'mColor': 0, 'mFaceName': 'System', 'mFixedHgt': 0.0, 'mHalo': 1, 'mItalicize': 0, 'mPlacement': 0, 'mPointSize': 0, 'mReserved2': 0, 'mReserved3': 0, 'mStrikeout': 0, 'mUnderline': 0, 'mWeight': 10}, 'mRotation': 0, 'mScale': - 10.0, 'mSymbolName': 'Dot'})[source]

Bases: globalmapper.GM_PointFeature_t

A Managed Definition of a Point Feature

PointFeature_t(mFeatureInfo: VectorFeature_t = VectorFeature_t(),mPos: Point_t = Point_t(0, 0),

mPointStyle: PointStyle_t = PointStyle_t(‘Default_Point_Style’))

Parameters
  • mFeatureInfo (VectorFeature_t) – Returns the Feature Info (To update us Various update functions)

  • mPos (Point_t) – Location of the point (global coordinates when getting, native when adding feature)

  • mPointStyle (PointStyle_t) – Point render style (symbol and font) (Read-Only use the SetPointStyle() member function to set)

class GM.PreTranslateMessageInfo_t(mMSG=0, mMsgProcessed=True)[source]

Bases: globalmapper.GM_PreTranslateMessageInfo_t

PreTranslateMessageInfo_t(mMSG: int = 0, mMsgProcessed: bool=True)

Parameters
  • mMSG (int) –

  • mMsgProcessed (bool) –

class GM.RasterDisplayOptions_t(mSize=0, mContrastMode=0, mAutoClipCollar=False, mColorIntensity=0, mSamplingMethod=0, mTextureMap=False, mBlendMode=0, mTranslucency=512, mTransparent=False, mTransparentColor=4294967295, mTransparentColorDist=0, mRedAdjustPercent=50, mGreenAdjustPercent=50, mBlueAdjustPercent=50, mBandLayoutValid=False, mBandIdxRed=0, mBandIdxGreen=0, mBandIdxBlue=0, mContrastNumStdDev=0, mContrastShared=False, mColorGradeValid=False, mColorGradeRedInMin=0, mColorGradeRedInMax=0, mColorGradeRedOutMin=0, mColorGradeRedOutMax=0, mColorGradeBlueInMin=0, mColorGradeBlueInMax=0, mColorGradeBlueOutMin=0, mColorGradeBlueOutMax=0, mColorGradeGreenInMin=0, mColorGradeGreenInMax=0, mColorGradeGreenOutMin=0, mColorGradeGreenOutMax=0, mColorGradeSaturation=0.5, mTransparentColorList=<globalmapper.COLORREF_array; proxy of <Swig Object of type 'COLORREF_array *'> >, mTransparentColorListSize=2)[source]

Bases: globalmapper.GM_RasterDisplayOptions_t

This type represents the display options available for raster and elevation layers

RasterDisplayOptions_t(self, mSize: int=0, mContrastMode: int=gm.GM_Contrast_None, mAutoClipCollar: bool=False, mColorIntensity: int=0, mSamplingMethod: int=gm.GM_SAMPLING_NEAREST_NEIGHBOR,

mTextureMap: bool=False, mBlendMode: int=gm.GM_BlendMode_None, mTranslucency: int=512, mTransparent: bool=False, mTransparentColor: int=0xFFFFFFFF, mTransparentColorDist: int=0, mRedAdjustPercent: int=50, mGreenAdjustPercent: int=50, mBlueAdjustPercent: int=50, mBandLayoutValid: bool=False, mBandIdxRed: int=0, mBandIdxGreen: int=0, mBandIdxBlue: int=0, mContrastNumStdDev: int=0, mContrastShared: bool=False, mColorGradeValid: bool=False, mColorGradeRedInMin: int=0, mColorGradeRedInMax: int=0, mColorGradeRedOutMin: int=0, mColorGradeRedOutMax: int=0, mColorGradeBlueInMin: int=0, mColorGradeBlueInMax: int=0, mColorGradeBlueOutMin: int=0, mColorGradeBlueOutMax: int=0, mColorGradeGreenInMin: int=0, mColorGradeGreenInMax: int=0, mColorGradeGreenOutMin: int=0, mColorGradeGreenOutMax: int=0, mColorGradeSaturation: float=0.5, mTransparentColorList: gm.COLORREF_array=gm.COLORREF_array(1))

Parameters
  • mSize (unit32, int) – Size

  • mContrastMode (GM_ContrastMode_t8) – Contrast adjustment mode

  • mAutoClipCollar (bool) – Automatically crop off a DRG, BSB, or other known collar boundary

  • mColorIntensity (uint8, int) – Color intensity (0-20). Lower values are lighter, higher values are darker.

  • mSamplingMethod (GM_SamplingMethod_t8, int) – Specify how resampling should be done for this layer for display and export

  • mTextureMap (bool) – Texture map this raster layer over any underlying elevation layers.

  • mBlendMode (GM_BlendMode_t8, int) – Blend mode to use to blend this raster layer with underlying layers or to interpret the color values of the layer

  • mTranslucency (uint16, int) – Translucency level of layer (0 - completely see-through, 512 - completely opaque)

  • mTransparent (bool) – Is layer transparent?

  • mTransparentColor (COLORREF, int) – Color to make transparent

  • mTransparentColorDist (uint8, int) – Fuzzy transparency support. Distance from transparent color to treat nearby colors transparent.

  • mRedAdjustPercent (sint8, int) – Percentage to adjust red color channel by (-100 to 100)

  • mGreenAdjustPercent (sint8, int) – Percentage to adjust green color channel by (-100 to 100)

  • mBlueAdjustPercent (sint8, int) – Percentage to adjust blue color channel by (-100 to 100)

  • mBandLayoutValid (bool) – Are the band layout values valid?

  • mBandIdxRed (uint8, int) – Index of color band (0-based) to use for red color channel

  • mBandIdxGreen (uint8, int) – Index of color band (0-based) to use for green color channel

  • mBandIdxBlue (uint8, int) – Index of color band (0-based) to use for blue color channel

  • mContrastNumStdDev (float (double)) – Number of standard deviations from mean to stretch for contrast adjustment (if 0 is used the default of 2 will be used)

  • mContrastShared (bool) – Is the contrast adjustment shared with other loaded layers?

  • mColorGradeValid (bool) – Are the color grade options valid?

  • mColorGradeRedInMin (uint8, int) – Minimum red input color value

  • mColorGradeRedInMax (uint8, int) – Maximum red input color value

  • mColorGradeRedOutMin (uint8, int) – Minimum red output color value

  • mColorGradeRedOutMax (uint8, int) – Maximum red output color value

  • mColorGradeBlueInMin (uint8, int) – Minimum Blue input color value

  • mColorGradeBlueInMax (uint8, int) – Maximum Blue input color value

  • mColorGradeBlueOutMin (uint8, int) – Minimum Blue output color value

  • mColorGradeBlueOutMax (uint8, int) – Maximum Blue output color value

  • mColorGradeGreenInMin (uint8, int) – Minimum Green input color value

  • mColorGradeGreenInMax (uint8, int) – Maximum Green input color value

  • mColorGradeGreenOutMin (uint8, int) – Minimum Green output color value

  • mColorGradeGreenOutMax (uint8, int) – Maximum Green output color value

  • mColorGradeSaturation (uint8, int) – Saturation (valid 0.0 - 1.0)

  • mTransparentColorList (COLORREF_array) – List of colors to make transparent. use set_mTransparentColorList(val) and get_mTransparentColorList() -> GM.COLORREF_array do not set directly.

  • mTransparentColorListSize (int) – Size of mTransparentColorList

class GM.RasterLayout_t(mFlags=1, mTopLeft=(0.0, 0.0), mXPixelSize=1, mYPixelSize=1, mPixelHeight=1080, mPixelWidth=1920, mNumBands=3, mBitsPerBand=8, mBytesPerRow=0, mPalette=None, mPaletteSize=0, mAlphaBandIdx=0)[source]

Bases: globalmapper.GM_RasterLayout_t

This type represents layout information for a new custom raster layer

RasterLayout_t(mTopLeft: Point_t, mFlags = gm.GM_RasterLayout_BGROrder, mXPixelSize: float = 1,

mYPixelSize: float = 1, mPixelHeight: int = 1080, mPixelWidth: int = 1920, mNumBands: int = 3, mBitsPerBand: int = 8, mBytesPerRow: int = 0, mPalette: COLORREF = None, mPaletteSize: int = 16, mAlphaBandIdx: int = 0)

Parameters
  • mTopLeft (Point_t) – Ground coordinates of top left corner of the top left pixel

  • mFlags (RasterLayoutFlags_t32) – General flags for layout.

  • mXPixelSize (float) – Size of each pixel in the x direction

  • float (mYPixelSize) – Size of each pixel in the y direction

  • mPixelWidth (int, sint32) – Number of pixels in the x direction

  • mPixelHeight (int, sint32) – Number of pixels in the y direction

  • mNumBands (int, uint32) – Number of bands of data (usually 1 for grayscale or 3 for RGB)

  • mBitsPerBand (int, uint32) – Number of bits per band of data (usually 8)

  • mBytesPerRow (int, uint32) – Number of bytes per row of data in data buffer. If 0 this will be calculated for you.

  • mPalette (COLORREF) – Array of colors for palette (set to NULL for no palette)

  • mPaletteSize (int, uint32) – Number of colors in palette

  • mAlphaBandIdx (int, uint32) – 0-based alpha channel band index (usually 0 or 3). Ignored unless GM_RasterLayout_AlphaPresent flag is set.

  • mYPixelSize (float) –

class GM.RoughnessGridParams_t(mTable=0, mFlags=1, mBounds=(0.0, 0.0, 0.0, 0.0), mDesc='Roughness layer_GM_attribute', mXSpacing=0, mYSpacing=0, mCreateAreas=True)[source]

Bases: globalmapper.GM_RoughnessGridParams_t

Structure defining setup for a roughness operation

RoughnessGridParams_t(mTable: int=gm.GM_Roughness_CorineSummer, mFlags: int=gm.GM_RoughnessFlags_DisableProgress, mBounds: Rectangle_t:Rectangle_t(), mXSpacing: float=0, mYSpacing: float=0,

mDesc: str=’Roughness layer_GM_attribute’, mCreateAreas: bool=True)

Parameters
  • mTable (GM_RoughnessTable_t, int) – Table to use for converting color/land cover type to roughness values

  • mFlags (GM_RoughnessGridFlags_t32, int) – Misc. flags to control operation

  • mBounds (GM.Rectangle_t) – Bounding rectangle (in specified projection) for roughness grid (pixel-is-area, i.e. provide coordinates of outer edge of sample not center of pixel)

  • mDesc (str) – Layer description

  • mXSpacing (float) – Grid cell spacing in X dimension in specified projection coordinates (use 0.0 for default)

  • mYSpacing (float) – Grid cell spacing in Y dimension in specified projection coordinates (use 0.0 for default)

  • mCreateAreas (bool) – Create roughness areas.

class GM.RotatedRect_t(mTopLeft=(0.0, 0.0), mTopRight=(0.0, 0.0), mBottomRight=(0.0, 0.0), mBottomLeft=(0.0, 0.0))[source]

Bases: globalmapper.GM_RotatedRect_t

This type defines a rotated rectangle with a ground coordinate at each of 4 corners

RotatedRect_t(mTopLeft: Point_t=Point_t(0, 0), mTopRight: Point_t=Point_t(0, 0),

mBottomRight: Point_t=Point_t(0, 0), mBottomLeft: Point_t=Point_t(0, 0))

Parameters
  • mTopLeft (GM_Point_t) – Top left point

  • mTopRight (GM_Point_t) – Top right point

  • mBottomRight (GM_Point_t) – Bottom right point

  • mBottomLeft (GM_Point_t) – Bottom left point

class GM.ShaderOptions_t(mSize=0, mDaylightShaderColor=4294967295, mGradientShaderLoColor=0, mGradientShaderHiColor=4294967295, mSlopeShaderMinColor=0, mSlopeShaderMinSlope=0, mSlopeShaderMaxColor=4294967295, mSlopeShaderMaxSlope=0, mHSVShaderLoColorStart=0, mHSVShaderSaturation=0.5, mHSVShaderValue=0.5, mHSVShaderRange=100, mHSVShaderReverse=False, mSlopeShaderCustomValid=True, mReserved=<globalmapper.uint8_array; proxy of <Swig Object of type 'uint8_array *'> >, mSlopeShaderCustomColor=4294967295)[source]

Bases: globalmapper.GM_ShaderOptions_t

This type represents the display options available for the built-in elevation shaders

ShaderOptions_t(mSize: int = 0, mDaylightShaderColor: int = 0xFFFFFFFF, mGradientShaderLoColor: int = 0,

mGradientShaderHiColor: int = 0xFFFFFFFF, mSlopeShaderMinColor: int = 0, mSlopeShaderMinSlope: float = 0, mSlopeShaderMaxColor: int = 0xFFFFFFFF, mSlopeShaderMaxSlope: float = 0, mHSVShaderLoColorStart: float = 0, mHSVShaderSaturation: float = 0.5, mHSVShaderValue: float = 0.5, mHSVShaderRange: float = 100, mHSVShaderReverse: bool = False, mSlopeShaderCustomValid: bool = True, mReserved = array([0,0], dtype=uint8),mSlopeShaderCustomColor: int = 0xFFFFFFFF)

Parameters
  • mSize (int, uint32) – Size of structure

  • mDaylightShaderColor (COLORREF, int) – Surface color for daylight shader

  • mGradientShaderLoColor (COLORREF, int) – Min elevation color for gradient shader

  • mGradientShaderHiColor (COLORREF, int) – Max elevation color for gradient shader

  • mSlopeShaderMinColor (COLORREF, int) – Min slope color for slope shader

  • mSlopeShaderMinSlope (float) – Min slope for slope shader in radians

  • mSlopeShaderMaxColor (COLORREF, int) – Max slope color for slope shader

  • mSlopeShaderMaxSlope (float) – Max slope for slope shader in radians

  • mHSVShaderLoColorStart (float) – HSV Shader - Low Color Start in Degrees (0-360)

  • mHSVShaderSaturation (float) – HSV Shader - Saturation (0-1)

  • mHSVShaderValue (float) – HSV Shader - Value (0-1)

  • mHSVShaderRange (float) – HSV Shader - Range (>1)

  • mHSVShaderReverse (bool) – HSV Shader - Reverse Colors

  • mSlopeShaderCustomValid (bool) – Is the custom slope shader color valid?

  • mReserved – Reserved padding bytes

  • mSlopeShaderCustomColor (COLORREF, int) – Color to display between min and max slope for slope shader (set mSlopeShaderCustomValid to TRUE to enable)

class GM.ValName_t(mVal, mName)[source]

Bases: globalmapper.GM_ValName_t

This type is used to describe a value and its associated name

Parameters
  • mVal (int) – Value

  • mName (str) – Value name

class GM.ViewShedParams_t(mSize, mAngleEnd, mAngleStart, mAtmosphericCorr, mCenterPoint, mColor=0, mDesc=None, mRadius=10000, mReceiverAngle=None, mReceiverHeight=5, mReceiverHeightAbs=False, mShowHiddenPoints=False, mShowProgress=True, mGenCoveragePolys=False, mTransmitterHeight=5, mTransmitterHeightAbs=False, mUseEarthCurvature=True, mVectorElevsAbs=False, mVectorLayerList=<globalmapper.GM_LayerHandle_array; proxy of <Swig Object of type 'GM_LayerHandle_array *'> >, mVectorLayerListCnt=1, mXSpacing=0.0, mYSpacing=0.0, mFilterRect=(0.0, 0.0, 0.0, 0.0), mReceiverAngleEnd=None, mFresnelFreq=0.0, mFresnelPctClear=0.6)[source]

Bases: globalmapper.GM_ViewShedParams_t

This type represents the display options available for the built-in elevation shaders

ViewShedParams_t(mVectorLayerList, mVectorLayerListCnt, mSize:int = 0, mAngleEnd: float = 6.28319,

mAngleStart = 0, mAtmosphericCorr = 1.33, mCenterPoint = Point_t(0, 0), mColor = 0, mDesc = None, mFilterRect = Rectangle_t(), mFresnelFreq = 0.0, mFresnelPctClear = 0.6, mGenCoveragePolys = False, mRadius = 10000, mReceiverAngle = None, mReceiverAngleEnd = None, mReceiverHeight = 5, mReceiverHeightAbs = False, mShowHiddenPoints = False, mShowProgress = True, mTransmitterHeight = 5, mTransmitterHeightAbs = False, mUseEarthCurvature = True, mVectorElevsAbs = False, mXSpacing = 0.0, mYSpacing = 0.0)

Parameters
  • mSize (int, uint32) – Size of structure

  • mAngleEnd (float) – End angle in radians for radar sweep

  • mAngleStart (float) – Start angle in radians for radar sweep

  • mAtmosphericCorr (float) – Atmospheric correction value (1.0 for none)

  • mCenterPoint (Point_t) – Center point in global coordinates

  • mColor (COLORREF) – Color to display view shed data in

  • mDesc (str) – View shed description

  • mRadius (float) – Search radius in meters

  • mReceiverAngle (float) – Angle (in degrees) above horizon to test at (NULL for none)

  • mReceiverHeight (float) – Height at which transmitter must be visible

  • mReceiverHeightAbs (float) – Is the receiver height absolute or relative to the ground?

  • mShowHiddenPoints (bool) – hidden points visible instead of viewable points.

  • mShowProgress (bool) – Display view shed calculation progress?

  • mGenCoveragePolys (float) – Generate area/polygon features for the covered area (these are vector and exportable to vector formats)

  • mTransmitterHeight (float) – Transmitter height in meters

  • mTransmitterHeightAbs (bool) – Is the transmitter height absolute or relative to the ground?

  • mUseEarthCurvature (bool) – Use the curvature of the earth in the analysis?

  • mVectorElevsAbs (bool) – Are vector elevations absolute (i.e. relative to sea level) or relative to ground level?

  • mVectorLayerList (GM_LayerHandle_t32) – List of vector layers to use features with elevation attributes from

  • mVectorLayerListCnt (int, uint32) – Number of vector layers in list

  • X (mXSpacing) – sample spacing (use 0.0 for default spacing)

  • Y (mYSpacing) – sample spacing (use 0.0 for default spacing)

  • mFilterRect (Rectangle_t) – Optional rectangle for filtering view shed to a certain area of interest

  • mReceiverAngleEnd (float) – (in degrees) above horizon to stop test at (NULL for none) - if this and mReceiverAngle are provided, an angle range view shed test is done (like a flashlight beam)

  • mFresnelFreq (float) – Frequency (in GHz) to use for testing clearance of first Fresnel zone (use 0.0 to not do Fresnel testing)

  • mFresnelPctClear (float) – Percentage of first Fresnel zone that must be clear of obstacles (use 0.6 for 60%). If 0 is specified, the default of 60% is used.

  • mXSpacing (float) –

  • mYSpacing (float) –

class GM.WatershedParams_t(mFlags=1, mBounds=(0.0, 0.0, 0.0, 0.0), mDesc='Watershed layer_GM_attribute', mXSpacing=0.0, mYSpacing=0.0, mFilledDEMFilename='', mMaxDepressionDepth=0.0, mStreamThreshold=2)[source]

Bases: globalmapper.GM_WatershedParams_t

Type defining parameters for watershed/drainage/stream calculation

WatershedParams_t(mFlags: int = gm.GM_Watershed_FillGaps, mBounds: Rectangle_t = Rectangle_t(),

mDesc: str = ‘Watershed layer_GM_attribute’, mXSpacing: float = 0.0, mYSpacing: float = 0.0, mFilledDEMFilename: str = “”, mMaxDepressionDepth: float = 0.0, mStreamThreshold: int = 2)

Parameters
  • mFlags (GM_WatershedFlags_32, int) – Flags with misc. options

  • mBounds (Rectangle_t) – Bounding rectangle (in specified projection) for watershed

  • mDesc (str) – Layer description

  • mXSpacing (float) – Grid cell spacing in X dimension in specified projection coordinates (use 0.0 for default)

  • mYSpacing (float) – Grid cell spacing in Y dimension in specified projection coordinates (use 0.0 for default)

  • mFilledDEMFilename (str) – Filename to save filled DEM to as a GMG file (typically NULL or empty string)

  • mMaxDepressionDepth (float) – Maximum depth of depression to fill in meters (0.0 for no depression filling)

  • mStreamThreshold (int, uint32) – Drainage threshold for how many cells have to flow to a cell before it is considered part of a stream.

class GM.WebFormatExportOpts_t(mMapName='', mMaxZoomLevel=3, mNumZoomLevels=3, mFormat=0, mFlags=1, mApiKey='', mBgMapName='', mTranslucency=1.0, mXRes=0.0, mYRes=0.0, mWWTilePath=None, mCustomTileFName=None, mMapDescription='', mMapType='baselayer', mTileSize=0)[source]

Bases: globalmapper.GM_WebFormatExportOpts_t

This type represents the options when exporting to a web format

WebFormatExportOpts_t(mMapName: str = “”, mMaxZoomLevel: int = 3, mNumZoomLevels: int = 3,

mFormat: int = gm.GM_Export_GeoTIFF, mFlags: int = gm.GM_WebExport_NoTransparency, mApiKey: str = “”, mBgMapName: str = “”, mTranslucency: float = 1.0, mXRes: float = 0.0, mYRes: float = 0.0, mWWTilePath: str = None, mCustomTileFName=None, mMapDescription: str = “”, mMapType: str = “baselayer”, mTileSize: int = 0)

Parameters
  • mMapName (str) – Name to use for map set

  • mMaxZoomLevel (int, uint32) – Maximum zoom level to export at (Google Maps, Virtual Earth/Bing Maps, and WorldWind exports only)

  • mNumZoomLevels (int, uint32) – Number of zoom levels to export (Google Maps, Virtual Earth/Bing Maps, and WorldWind exports only)

  • mFormat (GM_RasterExportFormat_t32, int) – Image format

  • mFlags (GM_WebExportFlags_t32, int) – Export flags

  • mApiKey (str) – API key (used for Google Maps and Bing Maps exports)

  • mBgMapName (str) – Background map name - used for Google Maps export (ie. ROADMAP, SATELLITE, HYBRID, or TERRAIN) or Bing Maps (i.e. road, aerial, birdseye, canvasDark, canvasLight, or grayscale)

  • mTranslucency (float) – Translucency setting for new map (0.0 - 1.0). 1.0 is opaque. If 0.0 is provided, it will be assumed to be 1.0.

  • mXRes (float) – X resolution for export (arc degrees for KML, meters for other, default of 0.0 is full resolution). Used to auto-select mMaxZoomLevel if not provided.

  • mYRes (float) – Y resolution for export (arc degrees for KML, meters for other, default of 0.0 is full resolution). Used to auto-select mMaxZoomLevel if not provided.

  • mWWTilePath (str) – Path to where WorldWind tiles should be stored. If NULL the path to the provide XML file will be used

  • mCustomTileFName (str) – Custom definition for tile filenames. Use NULL for default for format. Use variables like %z for zoom, %x for column, and %y for row. For example, use “%zprefix_%y_%x.png” to do one folder per zoom level. The tiles are created in the path under the HTML filename path.

  • mMapDescription (str) – Description for the map. Currently only used with MBTiles exports.

  • mMapType (str) – Type of MBTiles map. Must be “baselayer” or “overlay”.

  • mTileSize (int, uint32) – Pixel size of tile (i.e. 256, 512, 1024, etc.). Value of 0 results in default tile size (usually 256x256)

class GM.LidarClassFilter_t(mBitMask=<globalmapper.uint32_array; proxy of <Swig Object of type 'uint32_array *'> >)[source]

Bases: globalmapper.GM_LidarClassFilter_t

Define a filter for Lidar classes with 1 bit for each Lidar class (from 0-255). The first uint32 is for classes 0-31, the next for classes 32-63, etc. Use gm.LidarClassFilter_IsClassEnabled and gm.LidarClassFilter_SetClassEnabled to query or modify which classes are on or off.

LidarClassFilter_t(mBitMask: uint32_array=uint32_array([0, 0, 0, 0, 0, 0, 0, 0]))

Parameters

mBitMask (uint32_array, len(8)) – a bit for each LiDAR class. If the bit is 0, the class is enabled. If the bit is 1, the class is disabled.

class GM.LidarClassInfo_t(mClass=1, mClassGroup=4, mName='', mColor=4278190335)[source]

Bases: globalmapper.GM_LidarClassInfo_t

This type is used to get/set information about Lidar classes

LidarClassInfo_t(mClass: int=gm.GM_LidarClass_Unclassified, mClassGroup: int=gm.GM_LidarGroup_Noise, mName: str=””, mColor: int=0xFF0000FF)

Parameters
  • mClass (GM_LidarClass_t8, int) – Classification

  • mClassGroup (GM_LidarClassGroup_t16, int) – Mask of group(s) the class is in

  • mName (str) – Classification name (set to NULL to reset to default name in GM_SetLidarClassInfo)

  • mColor (COLORREF, int) – Color to use for rendering class points

class GM.PyGMException(_code, _message='')[source]

Bases: globalmapper.PyGMException

Parameters
  • _code (int) –

  • _message (str) –

error_message_pairs = {0: 'The function completed successfully', 1: 'The provided layer is not open', 2: 'A parameter was invalid', 3: 'Unable to load layer', 4: 'Multiple layers were found in the file being loaded (call GM_LoadLayerList instead)', 5: 'Unable to automatically crop the collar', 6: 'An unknown error occured drawing the layer(s)', 7: 'An unknown error occured exporting the layer(s)', 8: 'No data was available to export', 9: 'An invalid export format was specified', 10: 'An error occured rectifying the image', 11: 'The operation is not supported for the layer', 12: 'No registry key was found to enable this functionality', 13: 'No data was found at the specified location', 14: 'Not enough memory to complete the requested operation', 15: 'An error occured projecting a coordinate', 16: 'No view/export projection is currently set', 17: 'An error occurred performing the view shed analysis', 18: 'The user canceled the operation', 19: 'A connection to the TerraService could not be established', 20: 'No online source with the theme name provided could be found', 21: 'An error occurred generating the contours', 22: 'The layer provided is not a raster or elevation layer', 23: 'The provided handle is not a valid package', 24: 'There was no feature at the given index in the layer', 25: 'The drawing style passed in is not valid', 26: 'The symbol name provided does not match any available point symbols', 27: 'The symbol name specified has already been added', 28: 'The file specified could not be found', 29: 'The GPS data requested does not currently have a valid value available', 30: 'A GPS device is already being tracked, call GM_GPSStopTracking', 31: 'An error occurred calculating the volume', 32: 'The area does not have a hole at the index provided', 33: 'There is no map at the given index in the map catalog', 34: 'No 3D view window is currently open', 35: 'The ExternalViewerIntf.dll library was not found', 36: 'The ExternalViewerIntf.dll library did not have the proper interface', 37: 'Unexpected error creating 3D view', 38: 'Unexpected error setting 3D view', 39: 'No features were found within the search area', 40: 'Unexpected search area', 41: 'Some data was not drawn due to low available memory', 42: 'The layer provided is not an elevation layer', 43: 'The provided file was already in the map catalog to which it was being added.', 44: 'The provided type name was already used by an existing type', 45: 'A built-in datum with the given name already exists', 46: 'The ellipsoid name provided does not match a known ellipsoid', 47: 'Error generating grid from 3D vector data', 48: 'The shader name provided was not found', 49: 'The symbol name provided is not a custom one that can be deleted', 50: 'Error parsing MGRS coordinate string', 51: 'Error creating a buffer around a feature', 52: 'The data attempting to be exported or fetched is copyrighted', 53: 'A fill style with the provided name already exists', 54: 'An error was encountered adding the custom fill brush', 55: 'An ellipsoid with the given name already exists', 56: 'An error occurred combining the areas', 57: 'Empty tile was skipped on export due to passing GM_ExportFlags_SkipEmpty', 58: 'The feature does not have a single elevation value (for lines and areas there may be per-vertex values)', 59: 'Attempted to load an ArcGIS database, but there is no license for ArcGIS', 60: 'Attempted to use functionality that is not supported in a 64-bit build', 61: 'Unable to connect to the database using the input connection string', 62: 'Generic unspecified error', 63: 'Error running script', 64: 'The Lidar point index is out of range', 65: 'Nothing was changed by the modification', 66: 'The layer is not a palette-based layer', 67: 'The layer does not contain color imagery', 68: 'The provided band was outside the range of bands for the layer', 69: 'There are no elevation layers currently loaded', 70: 'There are no vector layers currently loaded', 71: 'Unspecified COAST processing error', 72: 'No model parameter file is loaded', 73: 'Error while reading or writing the registry', 74: 'The code page provided is not known', 75: 'The Lidar query that you passed in is not an active one', 76: 'The Lidar point was already in the Lidar query', 77: 'The Lidar point was not found in the Lidar query', 88: 'Number of Error Codes Defined', 65535: "The given function hasn't been implemented yet"}
class GM.LidarStats_t(mAllPointsStats={'mCount': 0, 'mKeyPointCount': 0, 'mMaxI': 0, 'mMaxZ': 0.0, 'mMinI': 0, 'mMinZ': 0.0, 'mOverlapCount': 0, 'mSyntheticCount': 0, 'mWithheldCount': 0}, mAttrStats=<globalmapper.GM_LidarAttrInfo_array; proxy of <Swig Object of type 'GM_LidarAttrInfo_array *'> >, mClassStats=<globalmapper.GM_LidarReturnInfo_array; proxy of <Swig Object of type 'GM_LidarReturnInfo_array *'> >, mReturnStats=<globalmapper.GM_LidarReturnInfo_array; proxy of <Swig Object of type 'GM_LidarReturnInfo_array *'> >, mAvgElev=0, mStdDevElev=0, mAvgIntensity=0, mStdDevIntensity=0)[source]

Bases: globalmapper.GM_LidarStats_t

Definition of statistics for a Lidar point cloud

LidarStats_t(mAllPointsStats: LidarReturnInfo_t = LidarReturnInfo_t(),

mAttrStats: gm.GM_LidarAttrInfo_array = gm.GM_LidarAttrInfo_array(1), mClassStats: gm.GM_LidarReturnInfo_array = gm.GM_LidarReturnInfo_array(1), mReturnStats: gm.GM_LidarReturnInfo_array = gm.GM_LidarReturnInfo_array(1), mAvgElev: float = 0, mStdDevElev: float = 0, mAvgIntensity: float = 0, mStdDevIntensity: float = 0)

Parameters
  • mAllPointsStats (LidarReturnInfo_t) – Statistics for everything together

  • mAttrStats (LidarAttrInfo_array) – Statistics by attribute

  • mClassStats (LidarReturnInfo_array) – Statistics by class

  • mReturnStats (LidarReturnInfo_array) – Statistics by return type

  • mAvgElev (float) – Average of elevation values

  • mStdDevElev (float) – Average of intensity values

  • mAvgIntensity (float) – Standard deviation of elevation values

  • mStdDevIntensity (float) – Standard deviation of intensity values

class GM.LidarQueryFilter_t(mClassFilter={'mBitMask': [0, 0, 0, 0, 0, 0, 0, 0]}, mColorDist=0, mColorsToKeep=None, mColorsToKeepCount=0, mTransparentColorListSize=0, mFilterFlags=0, mElevMaxValidM=0.0, mElevMinValidM=0.0, mHeightMaxValidM=0.0, mHeightMinValidM=0.0, mIntensityMin=0, mIntensityMax=0, mKeepFirstRetIfNoDelta=False, mNdviMaxValid=0.0, mNdviMinValid=0.0, mNdviRangeValid=True, mNdwiMaxValid=0.0, mNdwiMinValid=0.0, mNdwiRangeValid=True, mPointSourceIdList=None, mPointSourceIdListCount=1, mReturnHeightMaxAngle=0, mReturnHeightMaxValidM=0, mReturnHeightMinValidM=0, mReturnHeightMinKeepAllReturnCount=0, mReturnMask=0, mScanAngleMax=0, mScanAngleMin=0, mScanAngleValid=True, mDensityMax=0, mDensityMin=0, mDensityRangeValid=True)[source]

Bases: globalmapper.GM_LidarQueryFilter_t

Definition of Lidar query filter.

LidarQueryFilter_t(mSize: int=0, mClassFilter: LidarClassFilter_t=LidarClassFilter_t(), mColorDist: int=0, mColorsToKeep: gm.COLORREF_array=None, mFilterFlags: int=0, mElevMaxValidM: float=0.0, mElevMinValidM: float=0.0, mHeightMaxValidM: float=0.0, mHeightMinValidM: float=0.0, mIntensityMin: int=0, mIntensityMax: int=0, mKeepFirstRetIfNoDelta: bool=False, mNdviMaxValid: float=0.0, mNdviMinValid: float=0.0, mNdviRangeValid: bool=True, mNdwiMaxValid: float=0.0, mNdwiMinValid: float=0.0, mPointSourceIdList: gm.uint32_array=gm.uint32_array(1), mReturnHeightMaxAngle: int=0, mReturnHeightMaxValidM: float=0, mReturnHeightMinValidM: float=0, mReturnHeightMinKeepAllReturnCount: int=0, mReturnMask: int=0, mScanAngleMax: float=0, mScanAngleMin: float=0, mScanAngleValid: bool=True, mDensityMax: float=0, mDensityMin: float=0, mDensityRangeValid: bool=True)

Parameters
  • mClassFilter (LidarClassFilter_t) – Classification filter (zero’d out means all enabled)

  • mColorDist (int) – Maximum color “distance” to search when using mColorsToKeep

  • mColorsToKeep (COLORREF_array) – Optional list of colors to keep (NULL to not filter by color)

  • mColorsToKeepCount (int) – Size of mColorsToKeep

  • mFilterFlags (GM_LidarFilterFlags_t32, int) – Mask of filter flags to check. Default of 0 doesn’t check any flags.

  • mElevMaxValidM (float) – Maximum elevation to keep (meters). Use GM_INVALID_ELEV_VALUE for none.

  • mElevMinValidM (float) – Minimum elevation to keep (meters). Use GM_INVALID_ELEV_VALUE for none.

  • mHeightMaxValidM (float) – Maximum height above ground to keep (meters). Use GM_INVALID_ELEV_VALUE for none.

  • mHeightMinValidM (float) – Minimum height above ground to keep (meters). Use GM_INVALID_ELEV_VALUE for none.

  • mIntensityMax (int) – Maximum intensity to keep

  • mIntensityMin (int) – Minimum intensity to keep

  • mKeepFirstRetIfNoDelta (bool) – Keep first returns if the return height delta is 0 (use for files with missing last returns - Bug 15754)

  • mNdviMaxValid (float) – Maximum valid NDVI value (Range[-1,+1])

  • mNdviMinValid (float) – Minimum valid NDVI value (Range[-1,+1])

  • mNdviRangeValid (bool) – Should we check the NDVI (requires NIR channel)?

  • mNdwiMaxValid (float) – Maximum valid NDWI value (Range[-1,+1])

  • mNdwiMinValid (float) – Minimum valid NDWI value (Range[-1,+1])

  • mNdwiRangeValid (bool) – Should we check the NDWI?

  • mPointSourceIdList (uint32_array) – List of point source IDs to keep (NULL to not filter by point source ID)

  • mPointSourceIdListCount (int) – Size of mPointSourceIdList

  • mReturnHeightMaxAngle (int) – Maximum gradient angle in degrees between first and last point to filter out if return height outside of allowed range.

  • mReturnHeightMaxValidM (int) – Maximum return height delta to keep (meters)

  • mReturnHeightMinValidM (int) – Minimum return height delta to keep (meters)

  • mReturnHeightMinKeepAllReturnCount (bool) – If filtering to a return height range, minimum number of returns to have to keep and ignore the max angle

  • mReturnMask (int) – List of return masks to keep

  • mScanAngleMax (float) – Maximum scan angle (degrees) to keep

  • mScanAngleMin (float) – Minimum scan angle (degrees) to keep

  • mScanAngleValid (bool) – Is the scan angle range filter valid?

  • mDensityMax (float) – Max density to keep in points / m^2

  • mDensityMin (float) – Min density to keep in points / m^2

  • mDensityRangeValid (bool) – Should we filter by density range?

  • mTransparentColorListSize (int) –

class GM.LidarQueryInfo_t(mNumPoints=0, mLayerList=None, mLayerCount=0)[source]

Bases: globalmapper.GM_LidarQueryInfo_t

Define structure to hold information about a Lidar query

LidarQueryInfo_t(mNumPoints: int = 0, mLayerList: gm.GM_LayerHandle_array = None, mLayerCount: int=0)

Parameters
  • mNumPoints (int) – Total number of points in query

  • mLayerList (LayerHandle_array) – List of layers that have points in query

  • mLayerCount (int) – Size of mLayerList

class GM.ProjDef_t(mDefinition={'mAttrList': [(0, 0.0), (120, - 2.535912352140187e-212), (257, 1.3007834198716e-311), (0, - 1.3753424874989294e-231), (0, 0.0), (108, - 1.510072809552523e-309), (24909, 8.011006055295103e-307), (111, - 1.3756643679509863e-231), (0, 0.0), (111, - 1.3762860150382446e-231), (0, 0.0), (111, - 1.523207966736477e-309), (0, 0.0), (42000, - 4.045490622385726e-270), (49392, 2.1219957915e-314), (11824, - 3.876556535066773e-217)], 'mDatum': 23, 'mNumAttrs': 0, 'mProjSys': 0, 'mUnit': 2}, mWKT='')[source]

Bases: globalmapper.GM_ProjDef_t

This type is used to fully describe a projection.

ProjDef_t(mDefinition: Projection_t=Projection_t(), mWKT: str=””)

Parameters
  • mDefinition (Projection_t) – The projection to use

  • mWKT (str) – the WellKnownText

class GM.VerticalDisplayOptions_t(mShaderName='', mAmbientLight=1.0, mVertExag=1.0, mLightAltitude=45.0, mLightAzimuth=180.0, mHillShading=True, mWaterEnabled=True, mWaterAlpha=128, mWaterColorRed=0, mWaterColorGrn=0, mWaterColorBlue=255, mWaterLevel=0, mShadeDarkness=0, mShadeHighlight=0, mSlopeAlgorithm=0, mLightBlendingAlgorithm=0, mLightNumSources=1)[source]

Bases: globalmapper.GM_VerticalDisplayOptions_t

Structure with options controlling the display of terrain data

VerticalDisplayOptions_t(mShaderName: str = “”, mAmbientLight: float = 1.0, mVertExag: float = 1.0,

mLightAltitude: float = 45.0, mLightAzimuth: float = 180.0, mHillShading: bool = True, mWaterEnabled: bool = True, mWaterAlpha: int = 128, mWaterColorRed: int = 0, mWaterColorGrn: int = 0, mWaterColorBlue: int = 255, mWaterLevel: float = 0, mShadeDarkness: int = 0, mShadeHighlight: int = 0, mSlopeAlgorithm: int = gm.GM_SlopeAlg_Combined4, mLightBlendingAlgorithm: int = gm.GM_BLENDING_ALG_AVERAGE, mLightNumSources: int = 1)

Parameters
  • mShaderName (str) – Shader name

  • mAmbientLight (float) – Ambient light level (Range: 0.0 - 1.0)

  • mVertExag (float) – Vertical exaggeration (Range: 0.1 - 10.0)

  • mLightAltitude (float) – Light altitude (Range: 0.0 - 90.0)

  • mLightAzimuth (float) – Light azimuth (Range: 0.0 - 360.0)

  • mHillShading (bool) – Is hill shading enabled?

  • mWaterEnabled (bool) – Is Water display enabled?

  • mWaterAlpha (int) – Alpha translucency of water (Range: 0 - 255)

  • mWaterColorRed (int) – Water color - red component

  • mWaterColorGrn (int) – Water color - green component

  • mWaterColorBlue (int) – Water color - blue component

  • mWaterLevel (float) – Water level (meters)

  • mShadeDarkness (int) – Maximum hill shader shadow darkness (0 - 255, 0 is black, 255 is white)

  • mShadeHighlight (int) – Highlight level (whiteness) to apply for direct sunlight (0 is no additional whiteness, and 255 is completely white)

  • mSlopeAlgorithm (GM_SlopeAlg_t8, int) – Slope calculation algorithm

  • mLightBlendingAlgorithm (GM_ShaderBlendingAlg_t8, int) – Algorithm used to blend intensity when using multiple light sources

  • mLightNumSources (int) – Number of light sources (Range: 1 - 360)

GM.CombineTerrainLayers(aSetup)[source]

Combines two loaded terrain layers using some operation and creates a new terrain layer from the combined return. The returned new layer must be closed with GM_CloseLayer when you are done working with it.

GM.GenerateElevationGrid(aLayerList, aGridSetup)[source]

Generates an elevation grid and optionally a 3D area TIN layer from loaded 3D vector data. The layer handle(s) returned in <aGridLayer> and (optionally) <aTinLayer> must be closed with CloseLayer when you are done with them.