Global Mapper v26.0

Can you turn all Lidar classifications on in scripting

Hi,

I am new to global mapper and I'm not quite sure how to do something. I have a script to classify vegetation. Sometimes I have been doing testing in the GUI and I have the ground classification turned off in the "Lidar Filter Settings" to see more clearly, but forget to turn it back on. When I run the script after this my output files have lost all the ground classification

Is there a way to restore the default settings within a script so I can add a line of code so it doesn't matter if I forget to turn all the classifications on within the GUI?

I have looked in the scripting reference (SET_OPT is the closest, but can't turn on all classes as far as I can see). And tried to record a script of me resetting the classifications to default (It doesn't record anything)

Any help would be appreciated. I am using V24.0

Answers

  • You can definitely do that when importing a point cloud. I'm not sure if it works for an already loaded point cloud.

    Here's an example from one of mine:

    ---------------------------------------------

    //Import classified point cloud ground classifications and last/last of many returns only. 

    IMPORT FILENAME="%FNAME_W_DIR%" \

    TYPE="LIDAR_LAS" ELEV_UNITS="FEET" LABEL_FIELD_FORCE_OVERWRITE="NO" LABEL_FORMAT_NUMBERS="YES" \

    LABEL_PRECISION="-1" LABEL_REMOVE_TRAILING_ZEROS="YES" LABEL_USE_SCIENTIFIC_NOTATION="NO" \

    LOAD_FLAGS="535839232,73.000,%PREVIEW_PC%,4~0~0~0~0~0~0~0,,4294967048,0.00,1.00,1,-1,,,0|0|0" \

    ALT_MODE="ABSOLUTE" LIDAR_DRAW_MODE_GLOBAL="YES" LIDAR_DRAW_MODE="COLOR" LIDAR_POINT_SIZE="2" \

    LIDAR_DRAW_QUALITY="85" LIDAR_BRIGHTNESS="55" 

    ---------------------------------------------------------

    LOAD_FLAGS is the parameter to control this on import. If you search through the Global Mapper scripting reference, it looks like you can also use that with the SET_LAYER_OPTIONS function. I assume that's what you want to try for a loaded layer. https://www.bluemarblegeo.com/knowledgebase/global-mapper-24/GlobalMapper_ScriptingReference.pdf

  • Hi @DerrickW

    Thanks for the reply. I had tried as you suggested though I still have the same problem. If I set ground to be off in the GUI and then run from the command line it does not turn on and is missing from the output

    This is my script, its the same as yours except the flags are different because I want everything turned on


    DIR_LOOP_START DIRECTORY="%DATA_DIR1%\" FILENAME_MASKS="*.laz" RECURSE_DIR=NO


    //Import lidar data

    IMPORT FILENAME="%FNAME_W_DIR%" \

    TYPE="LIDAR_LAS" \

    ELEV_UNITS="METERS" \

    LABEL_FIELD_FORCE_OVERWRITE="NO" \

    LABEL_FORMAT_NUMBERS="YES" \

    LABEL_PRECISION="-1" \

    LABEL_REMOVE_TRAILING_ZEROS="YES" \

    LABEL_USE_SCIENTIFIC_NOTATION="NO" \

    LOAD_FLAGS="535822336" \

    ALT_MODE="ABSOLUTE" \

    LIDAR_DRAW_MODE_GLOBAL="YES" \

    LIDAR_DRAW_MODE="CLASS" \

    LIDAR_POINT_SIZE="0" \

    LIDAR_DRAW_QUALITY="85" \

    LIDAR_BRIGHTNESS="0"