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.


Definition of different Lidar attribute types that we will keep statistics for


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


Define ASPRS Lidar types


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 = 7

low point (noise)

GM_LidarClass_ModelKeyPoint = 8

thinned ground (model key points)

GM_LidarClass_Water = 9

GM_LidarClass_Railroad = 10

IMPORTANT NOTE: USGS used to use this as Overlap to DO NOT treat as ground.

GM_LidarClass_Road = 11

Road Surface

GM_LidarClass_Overlap = 12

GM_LidarClass_WireGuard = 13

Wire - Guard (Shield)

GM_LidarClass_WireConductor = 14

Wire - Conductor (Phase)

GM_LidarClass_TransmissionTower = 15

Transmission Tower

GM_LidarClass_WireStructureConnector = 16

Wire-structure Connector (e.g. Insulator)

GM_LidarClass_Bridge = 17

Bridge deck

GM_LidarClass_HighNoise = 18

High Noise point

GM_LidarClass_OverheadStructure = 19

Overhead structure

GM_LidarClass_IgnoredGround = 20

Ignored Ground (typically breakline proximity)

GM_LidarClass_Snow = 21

If 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


Define Lidar class groups to categorize what type(s) of data a classification represents

GM_LidarGroup_Surface = 0x0001

Surface points (i.e. ground, water, road)

GM_LidarGroup_OffSurface = 0x0002

Points that are definitely not on the surface

GM_LidarGroup_Noise = 0x0004

Noise points

GM_LidarGroup_Powerline = 0x0008

Points that are along a powerline

GM_LidarGroup_Structure = 0x0010

Points that are part of a solid structure (i.e. building)

GM_LidarGroup_Vegetation = 0x0020

Vegetation points

GM_LidarGroup_Bathy = 0x0040

Bathymetric (i.e. below water surface) points

GM_LidarGroup_Unclassified = 0x0080

Unclassified points


Drawing types for Lidar data

GM_LidarDraw_ElevWColor = 0

Color based on sample color if available, otherwise elevation

GM_LidarDraw_Elev = 1

Color based on elevation

GM_LidarDraw_Intensity = 2

Color based on intensity

GM_LidarDraw_Class = 3

Color based on class

GM_LidarDraw_Return = 4

Color based on return (1st, 2nd, etc.)

GM_LidarDraw_HeightAboveGround = 5

Color based on height above ground

GM_LidarDraw_PointSourceId = 6

Color based on point source ID

GM_LidarDraw_PointIndex = 7

Color based on point index

GM_LidarDraw_ReturnHeightDelta = 8

Color based on difference in height between first and last return of multi-return set

GM_LidarDraw_CIR = 9

Color infrared display using NIR/red/green for the RGB layout

GM_LidarDraw_NDVI = 10

Color NDVI value calculated from NIR and red band

GM_LidarDraw_NDWI = 11

Color NDWI value calculated from NIR and green band

GM_LidarDraw_Density = 12

Color based on point density

GM_LidarDraw_Withheld = 13

Color based on withheld flag

GM_LidarDraw_ModelKeyPoint = 14

Color based on model key point flag

GM_LidarDraw_Overlap = 15

Color based on overlap point flag

GM_LidarDraw_ScanAngle = 16

Color based on scan angle

GM_LidarDraw_ByLayer = 17

Color each layer a different color

GM_LidarDraw_SegmentId = 18

Color based on segment ID

GM_LidarDraw_NumTypes = 19

GM_LidarDraw_Default = GM_LidarDraw_ElevWColor

GM_LidarDraw_Multiple = 0xFE

Multiple different draw modes are select

GM_LidarDraw_UseGlobal = 0xFF

Use global draw mode setting


Define bit mask of Lidar fields that are to be updated

GM_LidarField_Class = 0x00000001

Classification is valid

GM_LidarField_Color = 0x00000002

Color fields are valid

GM_LidarField_XY = 0x00000004

XY fields are valid

GM_LidarField_Z = 0x00000008

Z field is valid

GM_LidarField_Intensity = 0x00000010

Intensity field is valid

GM_LidarField_KeyPoint = 0x00000020

Key point flag is valid

GM_LidarField_Overlap = 0x00000040

Overlap flag is valid

GM_LidarField_Synthetic = 0x00000080

Synthetic flag is valid

GM_LidarField_Withheld = 0x00000100

Withheld flag is valid

GM_LidarField_Deleted = 0x00000200

Deleted flag is valid

GM_LidarField_GroundHeight = 0x00000400

Height above ground is valid

GM_LidarField_ReturnHeight = 0x00000800

Return height delta is valid

GM_LidarField_NIR = 0x00001000

NIR fields are valid

GM_LidarField_ReturnNum = 0x00002000

Return number field is valid

GM_LidarField_ReturnCount = 0x00004000

Return count field is valid

GM_LidarField_ScanAngle = 0x00008000

Scan angle field is valid

GM_LidarField_ScannerChannel = 0x00010000

Scanner channel field is valid

GM_LidarField_SourceID = 0x00020000

Point source ID field is valid

GM_LidarField_UserData = 0x00040000

User data field is valid

GM_LidarField_EdgeFlightLine = 0x00080000

Edge of flight line field is valid

GM_LidarField_SegmentID = 0x00100000

Segment ID field is valid

GM_LidarFieldMask_All = 0xFFFFFFFF

All 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


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.

GM_LidarFilterFlag_WithheldValid = 0x00000001

Check the withheld flag

GM_LidarFilterFlag_Withheld = 0x00000002

Point is withheld

GM_LidarFilterFlag_KeyPointValid = 0x00000004

Check the key point flag

GM_LidarFilterFlag_KeyPoint = 0x00000008

Point is key point

GM_LidarFilterFlag_OverlapValid = 0x00000010

Check the overlap flag

GM_LidarFilterFlag_Overlap = 0x00000020

Point is overlap

GM_LidarFilterFlag_SyntheticValid = 0x00000040

Check the synthetic flag

GM_LidarFilterFlag_Synthetic = 0x00000080

Point is synthetic

GM_LidarFilterFlag_DeletedValid = 0x00000100

Check the deleted flag

GM_LidarFilterFlag_Deleted = 0x00000200

Point is deleted

GM_LidarFilterFlag_ModifiedValid = 0x00000400

Check the modified flag

GM_LidarFilterFlag_Modified = 0x00000800

Point has been modified

GM_LidarFilterFlag_EdgeofFlightLineValid = 0x00001000

Check the edge of flight flag

GM_LidarFilterFlag_EdgeofFlightLine = 0x00002000

Point is edge of flight

GM_LidarFilterFlag_ScanDirectionValid = 0x00004000

Check the scan direction flag

GM_LidarFilterFlag_ScanDirection = 0x00008000

Point is positive scan direction

GM_LidarFilterFlag_NoneValid = 0x00010000

Check the none flag

GM_LidarFilterFlag_None = 0x00020000

Point has no flags set


Define flags for Lidar point features

GM_LidarFlags_ColorValid = 0x00000001

Are the red, green, and blue color values valid?

GM_LidarFlags_Withheld = 0x00000002

Is the point withheld?

GM_LidarFlags_Synthetic = 0x00000004

Is the point synthetic?

GM_LidarFlags_KeyPoint = 0x00000008

Is the point a key point?

GM_LidarFlags_Overlap = 0x00000010

Is the point overlap?

GM_LidarFlags_ScanDir = 0x00000020

Scan direction

GM_LidarFlags_EdgeOfFlightLine = 0x00000040

Is the point on the edge of the flight line

GM_LidarFlags_Deleted = 0x00000080

Is the point marked as deleted

GM_LidarFlags_Modified = 0x00000100

Has the point been modified since load?

GM_LidarFlags_NirValid = 0x00000200

Is the NIR (near infrared) value valid?


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.


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


Define what field of data to grid for Lidar data

GM_LidarGrid_Elevation = 0

Grid the elevation values

GM_LidarGrid_Intensity = 1

Grid Lidar point intensity values rather than elevation values

GM_LidarGrid_Height = 2

Grid Lidar height above ground rather than elevation values

GM_LidarGrid_ColorRGB = 3

Grid the RGB color from Lidar points

GM_LidarGrid_ColorRGBI_NIR = 4

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

GM_LidarGrid_ColorRGBI_Intensity = 5

Grid the RGBI color from 4-band Lidar (RGB+Intensity)

GM_LidarGrid_Class = 6

Grid the classification code from Lidar points

GM_LidarGrid_Density = 7

Grid the point density in points / m^2 of a Lidar point cloud

GM_LidarGrid_NDVI = 8

Grid the calculated NDVI value from 4-band Lidar (RGB+NIR)

GM_LidarGrid_NDWI = 9

Grid the calculated NDWI value from 4-band Lidar (RGB+NIR)

GM_LidarGrid_Red = 10

Grid the Red value (single band)

GM_LidarGrid_Green = 11

Grid the Green value (single band)

GM_LidarGrid_Blue = 12

Grid the Blue value (single band)

GM_LidarGrid_NIR = 13

Grid the NIR value (single band)

GM_LidarGrid_ScanAngle = 14

Grid the Scan Angle value

GM_LidarGrid_PointSourceID = 15

Grid the Point Source ID value

GM_LidarGrid_UserData = 16

Grid the User Data value

GM_LidarGrid_ScannerChannel = 17

Grid the Scanner Channel value

GM_LidarGrid_NumPointsInCell = 18

Grid the number of points in each cell

GM_LidarGrid_NumTypes = 19


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

GM_LidarPulseId_OnlyGpsTime = 0

Only the sequence/GPS time is considered

GM_LidarPulseId_UserData = 1

Points must have appropriate GPS time and same user data to be part of same return

GM_LidarPulseId_PointSourceID = 2

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

GM_LidarPulseId_ScannerChannel = 3

Points must have appropriate GPS time and same scanner channel to be part of same return

GM_LidarPulseId_PointSourceID_ScannerChannel = 4

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

GM_LidarPulseId_PointSourceID_UserData = 5

Points 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


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.


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 = 7

Return number >= 3

GM_LidarReturn_LastOfMany = 8

GM_LidarReturn_NumTypes = 9

Types for backwards code compatibility

GM_LidarReturn_ThirdOfMany = GM_LidarReturn_ThirdOrLaterOfMany

Return number >= 3