Global Mapper v24.0

Example printing LAS series to PNG - possible to print a PNG in 3D view?

sjf
sjf Global Mapper User

Below an example script to print a series of LAS files to PNG.

I can then animate the PNG file series. But what I really want is to print a PNG series in 3D view?

How can I do that? The 3D view only shows up when the script has ended.

Is there a way to update the screen at every step and then continue, after and interval (1 second or something). Is there a way to print the 3D view (I only have maximize option).

The script will run through a list of file numbers. I tried stopping it with a prompt.

What Are my options to print 3D views with a script other than by hand...

GLOBAL_MAPPER_SCRIPT VERSION="1.00"

VAR_LOOP_START VAL_START=1866817715 VAL_STOP=1866818195 VAL_STEP=1 VAR_NAME="%COL%"

IMPORT FILENAME="D:\LAS_bat\las\laser_3sec_%COL%.las"

  LAYER_LOOP_START FILENAME="D:\LAS_bat\las\laser_3sec_%COL%.las"

SHOW_3D_VIEW NAME="%LAYER_FNAME_W_DIR%" MAXIMIZE=NO

// DEFINE_VAR NAME="%LAYER_FNAME_W_DIR%" PROMPT=YES_NO_CANCEL PROMPT_TEXT="Print?" ABORT_ON_CANCEL=YES

EXPORT_RASTER FILENAME=D:\LAS_bat\PNG\%LAYER_FNAME_WO_EXT%_SJF.png TYPE=PNG LAYER_BOUNDS="Bounds" PALETTE=OPTIMIZED

SET_LAYER_OPTIONS FILENAME="%LAYER_FNAME_W_DIR%" HIDDEN=NO

UNLOAD_LAYER FILENAME="%LAYER_FNAME_W_DIR%"

LAYER_LOOP_END

// UNLOAD_ALL

VAR_LOOP_END

Tagged:

Best Answer

  • bmg_mike
    bmg_mike Global Mapper Guru
    Accepted Answer

    There really isn't a way to dynamically direct the 3D view like that from a traditional script. The SHOW_3D_VIEW command is mainly there just to display the 3D view after the fact.

    If you want to dynamically handle the 3D view, you would need to use the new Python scripting capabilities in v23.0 and later. With a Python script (and a GM Pro license), you can call the GM SDK functions, like GM_3DSaveViewToFile, as you work.

    I'm not sure this has been done yet and I'm not a Python expert, but you should be able to code up the import loop in Python calling the appropriate functions to load each layer, display it in the 3D view, save the 3D view to a PNG file, then repeat. See https://www.bluemarblegeo.com/knowledgebase/global-mapper-python-23/setup%20guides/GM-app-python-setup.html for a reference to setting up the Python scripting engine and using the Python wrappers to the GM SDK functions.

    Thanks,

    Mike

    Global Mapper Guru

    geohelp@bluemarblegeo.com

Answers

  • sjf
    sjf Global Mapper User

    thanks,

    So python it is... Will let you know when I get there: would be awesome.

    cheers

    Stefan

Sign In or Register to comment.