Global Mapper Pro

ClassStat – A Global Mapper Script for Lidar Stats

kbellis Global Mapper UserTrusted User
edited October 2013 in GM Script Language
ClassStat peek.PNG
Here's a sneak peek of the new Global Mapper Scripting brush for SyntaxHighlighter!

ClassStat – A Global Mapper Script for Lidar Stats

Feel free to download this script and tweak to your particular needs.
ClassStat.gms (zipped)


  • Geo
    Geo Global Mapper User Trusted User
    edited October 2013
    your Scripting brush for SyntaxHighlighter in WordPress is impressive ! [+1]
  • kbellis
    kbellis Global Mapper User Trusted User
    edited October 2013
    Thanks Geo :)

    It was easier getting the cloned cpp brush to work locally than in this WordPress venue. Alex Mills' plugin has a nice settings interface for the WP plugin in getting Alex Gorbatchev's plugin setup, but introducing a new custom brush was quite maddening and not wholly proper.
  • kbellis
    kbellis Global Mapper User Trusted User
    edited October 2013
    Appearances aside - something's askance with how this script is running...

    script results src.PNG
    script results data.PNG
    script results 0602.PNG
    script results 1204.PNG
    Something strange happened and it wasn't at first clear why it ran perfectly once, in the source (\data) instance; however, in all of the other folders as shown in the uppermost left figure, only classes [01] and [02] were produced.

    At first I thought that maybe, the answer lay hidden within the flags as darned if I can decipher these cryptic critters. But the more likely reason is pointing at MCC-LIDAR and its output:
    Description of MCC-LiDAR Output

    The output LAS file differs from the input LAS file in that those returns classified as ground will be assigned a value of 2 as per the LAS classification standard ( MCC makes no assumptions about the non-ground returns and so leaves these values either as is, or if they were set to 0 then these will be updated to 1, indicating that a classification algorithm has been used. Future versions of MCC may classify returns as 5 (high vegetation), 4 (medium vegetation), or 3 (low vegetation), corresponding to the 3 scale domains at which MCC calculates curvatures from thin plate spline surfaces as it iterates through the point cloud.

    The procedure I've done more than once: to set the flags for importing / scripting purpose start a new GM session, import class(es) as desired, save, study the .gms, copy that bit that lies between LOAD_FLAGS=" [and] "

    This ClassStat.gms had been run from a bat:
    @ECHO off
    echo Adding global_mapper folder to PATH environment variable...
    PATH="C:\Program Files\GlobalMapper15_64bit";%PATH%
    global_mapper "C:\MCC-LIDAR experiments\ClassStat.gms" 

    All data (except the source data in \data) was produced by MCC-LIDAR. I've put this ticket into Andy's queue:
    Processing data which had non-ground returns [7], [09], [10], [12], and [19] in the source (input) data is no longer available once processed through MCC-LIDAR (output). This is in stark contrast to the stated premise about the non-ground returns would be left as is.

    File size: input/output remained unaffected.

Sign In or Register to comment.