# Types for Lidar Functions¶

The following types are used as parameters and return values in the various Lidar operations within GlobalMapper. These types use fixed, numeric constants, which are defined here.

- globalmapper.GM_LidarAttr_t8¶
Definition of different Lidar attribute types that we will keep statistics for

- Values
**GM_LidarAttr_ReturnNo**= 0**GM_LidarAttr_Intensity**= 1**GM_LidarAttr_Class**= 2**GM_LidarAttr_ScanAngle**= 3**GM_LidarAttr_UserData**= 4**GM_LidarAttr_PointSource**= 5**GM_LidarAttr_NumTypes**= 6

- globalmapper.GM_LidarClass_t8¶
Define ASPRS Lidar types

- Values
**GM_LidarClass_NeverClassified**= 0**GM_LidarClass_Unclassified**= 1**GM_LidarClass_Ground**= 2**GM_LidarClass_LowVeg**= 3**GM_LidarClass_MedVeg**= 4**GM_LidarClass_HighVeg**= 5**GM_LidarClass_Building**= 6**GM_LidarClass_LowPoint**= 7low point (noise)

**GM_LidarClass_ModelKeyPoint**= 8thinned ground (model key points)

**GM_LidarClass_Water**= 9**GM_LidarClass_Railroad**= 10IMPORTANT NOTE: USGS used to use this as Overlap to DO NOT treat as ground.

**GM_LidarClass_Road**= 11Road Surface

**GM_LidarClass_Overlap**= 12**GM_LidarClass_WireGuard**= 13Wire - Guard (Shield)

**GM_LidarClass_WireConductor**= 14Wire - Conductor (Phase)

**GM_LidarClass_TransmissionTower**= 15Transmission Tower

**GM_LidarClass_WireStructureConnector**= 16Wire-structure Connector (e.g. Insulator)

**GM_LidarClass_Bridge**= 17Bridge deck

**GM_LidarClass_HighNoise**= 18High Noise point

**GM_LidarClass_OverheadStructure**= 19Overhead structure

**GM_LidarClass_IgnoredGround**= 20Ignored Ground (typically breakline proximity)

**GM_LidarClass_Snow**= 21If present and identifiable

*New types from Topo-Bathy Lidar profile***GM_LidarClass_BathyPoint**= 40**GM_LidarClass_WaterSurface**= 41**GM_LidarClass_DerivedWaterSurface**= 42**GM_LidarClass_SubmergedObject**= 43**GM_LidarClass_IhoS57Object**= 44**GM_LidarClass_NoBottomFoundBathyPoint**= 45**GM_LidarClass_MaxValid**= 255

- globalmapper.GM_LidarClassGroup_t16¶
Define Lidar class groups to categorize what type(s) of data a classification represents

- Values
**GM_LidarGroup_Surface**= 0x0001Surface points (i.e. ground, water, road)

**GM_LidarGroup_OffSurface**= 0x0002Points that are definitely not on the surface

**GM_LidarGroup_Noise**= 0x0004Noise points

**GM_LidarGroup_Powerline**= 0x0008Points that are along a powerline

**GM_LidarGroup_Structure**= 0x0010Points that are part of a solid structure (i.e. building)

**GM_LidarGroup_Vegetation**= 0x0020Vegetation points

**GM_LidarGroup_Bathy**= 0x0040Bathymetric (i.e. below water surface) points

**GM_LidarGroup_Unclassified**= 0x0080Unclassified points

- globalmapper.GM_LidarDrawMode_t8¶
Drawing types for Lidar data

- Values
**GM_LidarDraw_ElevWColor**= 0Color based on sample color if available, otherwise elevation

**GM_LidarDraw_Elev**= 1Color based on elevation

**GM_LidarDraw_Intensity**= 2Color based on intensity

**GM_LidarDraw_Class**= 3Color based on class

**GM_LidarDraw_Return**= 4Color based on return (1st, 2nd, etc.)

**GM_LidarDraw_HeightAboveGround**= 5Color based on height above ground

**GM_LidarDraw_PointSourceId**= 6Color based on point source ID

**GM_LidarDraw_PointIndex**= 7Color based on point index

**GM_LidarDraw_ReturnHeightDelta**= 8Color based on difference in height between first and last return of multi-return set

**GM_LidarDraw_CIR**= 9Color infrared display using NIR/red/green for the RGB layout

**GM_LidarDraw_NDVI**= 10Color NDVI value calculated from NIR and red band

**GM_LidarDraw_NDWI**= 11Color NDWI value calculated from NIR and green band

**GM_LidarDraw_Density**= 12Color based on point density

**GM_LidarDraw_Withheld**= 13Color based on withheld flag

**GM_LidarDraw_ModelKeyPoint**= 14Color based on model key point flag

**GM_LidarDraw_Overlap**= 15Color based on overlap point flag

**GM_LidarDraw_ScanAngle**= 16Color based on scan angle

**GM_LidarDraw_ByLayer**= 17Color each layer a different color

**GM_LidarDraw_SegmentId**= 18Color based on segment ID

**GM_LidarDraw_NumTypes**= 19**GM_LidarDraw_Default**= GM_LidarDraw_ElevWColor**GM_LidarDraw_Multiple**= 0xFEMultiple different draw modes are select

**GM_LidarDraw_UseGlobal**= 0xFFUse global draw mode setting

- globalmapper.GM_LidarFieldMask_t32¶
Define bit mask of Lidar fields that are to be updated

- Values
**GM_LidarField_Class**= 0x00000001Classification is valid

**GM_LidarField_Color**= 0x00000002Color fields are valid

**GM_LidarField_XY**= 0x00000004XY fields are valid

**GM_LidarField_Z**= 0x00000008Z field is valid

**GM_LidarField_Intensity**= 0x00000010Intensity field is valid

**GM_LidarField_KeyPoint**= 0x00000020Key point flag is valid

**GM_LidarField_Overlap**= 0x00000040Overlap flag is valid

**GM_LidarField_Synthetic**= 0x00000080Synthetic flag is valid

**GM_LidarField_Withheld**= 0x00000100Withheld flag is valid

**GM_LidarField_Deleted**= 0x00000200Deleted flag is valid

**GM_LidarField_GroundHeight**= 0x00000400Height above ground is valid

**GM_LidarField_ReturnHeight**= 0x00000800Return height delta is valid

**GM_LidarField_NIR**= 0x00001000NIR fields are valid

**GM_LidarField_ReturnNum**= 0x00002000Return number field is valid

**GM_LidarField_ReturnCount**= 0x00004000Return count field is valid

**GM_LidarField_ScanAngle**= 0x00008000Scan angle field is valid

**GM_LidarField_ScannerChannel**= 0x00010000Scanner channel field is valid

**GM_LidarField_SourceID**= 0x00020000Point source ID field is valid

**GM_LidarField_UserData**= 0x00040000User data field is valid

**GM_LidarField_EdgeFlightLine**= 0x00080000Edge of flight line field is valid

**GM_LidarField_SegmentID**= 0x00100000Segment ID field is valid

**GM_LidarFieldMask_All**= 0xFFFFFFFFAll fields are valid

*Define mask of fields that are used during Lidar statistics calculation***GM_LidarFieldMask_NonStats**= ( _LidarField_Color | GM_LidarField_XY | GM_LidarField_SegmentID | GM_LidarField_NIR )**GM_LidarFieldMask_Stats**= ~GM_LidarFieldMask_NonStats

- globalmapper.GM_LidarFilterFlags_t32¶
Define point flags to keep for filter. Each flag has both a bit to say whether we care about it and another to say if we want to keep if on or off.

- Values
**GM_LidarFilterFlag_WithheldValid**= 0x00000001Check the withheld flag

**GM_LidarFilterFlag_Withheld**= 0x00000002Point is withheld

**GM_LidarFilterFlag_KeyPointValid**= 0x00000004Check the key point flag

**GM_LidarFilterFlag_KeyPoint**= 0x00000008Point is key point

**GM_LidarFilterFlag_OverlapValid**= 0x00000010Check the overlap flag

**GM_LidarFilterFlag_Overlap**= 0x00000020Point is overlap

**GM_LidarFilterFlag_SyntheticValid**= 0x00000040Check the synthetic flag

**GM_LidarFilterFlag_Synthetic**= 0x00000080Point is synthetic

**GM_LidarFilterFlag_DeletedValid**= 0x00000100Check the deleted flag

**GM_LidarFilterFlag_Deleted**= 0x00000200Point is deleted

**GM_LidarFilterFlag_ModifiedValid**= 0x00000400Check the modified flag

**GM_LidarFilterFlag_Modified**= 0x00000800Point has been modified

**GM_LidarFilterFlag_EdgeofFlightLineValid**= 0x00001000Check the edge of flight flag

**GM_LidarFilterFlag_EdgeofFlightLine**= 0x00002000Point is edge of flight

**GM_LidarFilterFlag_ScanDirectionValid**= 0x00004000Check the scan direction flag

**GM_LidarFilterFlag_ScanDirection**= 0x00008000Point is positive scan direction

**GM_LidarFilterFlag_NoneValid**= 0x00010000Check the none flag

**GM_LidarFilterFlag_None**= 0x00020000Point has no flags set

- globalmapper.GM_LidarFlags_t32¶
Define flags for Lidar point features

- Values
**GM_LidarFlags_ColorValid**= 0x00000001Are the red, green, and blue color values valid?

**GM_LidarFlags_Withheld**= 0x00000002Is the point withheld?

**GM_LidarFlags_Synthetic**= 0x00000004Is the point synthetic?

**GM_LidarFlags_KeyPoint**= 0x00000008Is the point a key point?

**GM_LidarFlags_Overlap**= 0x00000010Is the point overlap?

**GM_LidarFlags_ScanDir**= 0x00000020Scan direction

**GM_LidarFlags_EdgeOfFlightLine**= 0x00000040Is the point on the edge of the flight line

**GM_LidarFlags_Deleted**= 0x00000080Is the point marked as deleted

**GM_LidarFlags_Modified**= 0x00000100Has the point been modified since load?

**GM_LidarFlags_NirValid**= 0x00000200Is the NIR (near infrared) value valid?

- globalmapper.GM_LidarFlagType_t8¶
Definition of different return types that we will keep statistics for. There is a bit mask for these returned below so we can easily get all return types that apply.

- Values
**GM_LidarFlag_Synthetic**= 0**GM_LidarFlag_KeyPoint**= 1**GM_LidarFlag_Overlay**= 2**GM_LidarFlag_Withheld**= 3**GM_LidarFlag_EdgeOfFlightLine**= 4**GM_LidarFlag_None**= 5**GM_LidarFlag_NumTypes**= 6

- globalmapper.GM_LidarGridField_t8¶
Define what field of data to grid for Lidar data

- Values
**GM_LidarGrid_Elevation**= 0Grid the elevation values

**GM_LidarGrid_Intensity**= 1Grid Lidar point intensity values rather than elevation values

**GM_LidarGrid_Height**= 2Grid Lidar height above ground rather than elevation values

**GM_LidarGrid_ColorRGB**= 3Grid the RGB color from Lidar points

**GM_LidarGrid_ColorRGBI_NIR**= 4Grid the RGBI color from 4-band Lidar (RGB+NIR)

**GM_LidarGrid_ColorRGBI_Intensity**= 5Grid the RGBI color from 4-band Lidar (RGB+Intensity)

**GM_LidarGrid_Class**= 6Grid the classification code from Lidar points

**GM_LidarGrid_Density**= 7Grid the point density in points / m^2 of a Lidar point cloud

**GM_LidarGrid_NDVI**= 8Grid the calculated NDVI value from 4-band Lidar (RGB+NIR)

**GM_LidarGrid_NDWI**= 9Grid the calculated NDWI value from 4-band Lidar (RGB+NIR)

**GM_LidarGrid_Red**= 10Grid the Red value (single band)

**GM_LidarGrid_Green**= 11Grid the Green value (single band)

**GM_LidarGrid_Blue**= 12Grid the Blue value (single band)

**GM_LidarGrid_NIR**= 13Grid the NIR value (single band)

**GM_LidarGrid_ScanAngle**= 14Grid the Scan Angle value

**GM_LidarGrid_PointSourceID**= 15Grid the Point Source ID value

**GM_LidarGrid_UserData**= 16Grid the User Data value

**GM_LidarGrid_ScannerChannel**= 17Grid the Scanner Channel value

**GM_LidarGrid_NumPointsInCell**= 18Grid the number of points in each cell

**GM_LidarGrid_NumTypes**= 19

- globalmapper.GM_LidarReturnPulseId_t8¶
Enumeration specifying how pulses in a multi-return are identified. They must be contiguous (i.e. by GPS time), but can also skip over things with different fields, like user data or point source ID

- Values
**GM_LidarPulseId_OnlyGpsTime**= 0Only the sequence/GPS time is considered

**GM_LidarPulseId_UserData**= 1Points must have appropriate GPS time and same user data to be part of same return

**GM_LidarPulseId_PointSourceID**= 2Points must have appropriate GPS time and same point source ID to be part of same return

**GM_LidarPulseId_ScannerChannel**= 3Points must have appropriate GPS time and same scanner channel to be part of same return

**GM_LidarPulseId_PointSourceID_ScannerChannel**= 4Points must have appropriate GPS time and same point source ID and scanner channel to be part of same return

**GM_LidarPulseId_PointSourceID_UserData**= 5Points must have appropriate GPS time and same point source ID and user data to be part of same return

**GM_LidarPulseId_NumTypes**= 6**GM_LidarPulseId_Default**= GM_LidarPulseId_OnlyGpsTime

- globalmapper.GM_LidarReturnType_t8¶
Definition of different return types that we will keep statistics for. There is a bit mask for these returned below so we can easily get all return types that apply.

- Values
**GM_LidarReturn_Unknown**= 0**GM_LidarReturn_First**= 1**GM_LidarReturn_Second**= 2**GM_LidarReturn_Last**= 3**GM_LidarReturn_Single**= 4**GM_LidarReturn_FirstOfMany**= 5**GM_LidarReturn_SecondOfMany**= 6**GM_LidarReturn_ThirdOrLaterOfMany**= 7Return number >= 3

**GM_LidarReturn_LastOfMany**= 8**GM_LidarReturn_NumTypes**= 9Types for backwards code compatibility

**GM_LidarReturn_ThirdOfMany**= GM_LidarReturn_ThirdOrLaterOfManyReturn number >= 3