Creating a script file

Dimitris
Dimitris Global Mapper User
edited July 2008 in Technical Support
Hi guys,

I just started using global mapper. I have a very simple question. I looked at the user's manual but I couldn't find the answer... So, how do you create a script file?

Thanks a lot!!!
D.

Comments

  • timhoman
    timhoman Global Mapper User Trusted User
    edited July 2008

    convert_to_8bit.gms

    GLOBAL_MAPPER_SCRIPT VERSION=1.00
    UNLOAD_ALL
    IMPORT FILENAME="image_001.tif"
    EXPORT_RASTER FILENAME="image_001_8bit.tif" TYPE=GEOTIFF PALETTE=OPTIMIZED OVERWRITE_EXISTING=NO
    UNLOAD_ALL
    IMPORT FILENAME="image_002.tif"
    EXPORT_RASTER FILENAME="image_002_8bit.tif" TYPE=GEOTIFF PALETTE=OPTIMIZED OVERWRITE_EXISTING=NO
    UNLOAD_ALL
    -The script file is just a text file you can create with any editor - use a .gms extension.
    -Above is a sample set from of a script that actually contains hundreds of lines for processing images.
    -The 1st line "GLOBAL_MAPPER_SCRIPT...." is a must.
    -The other lines are functions described in the manual: "GlobalMapperHelp.pdf". Although the examples are not very extensive they give enough to get started. The scripting language starts on page 145 with examples at the end.
    -In this script I basically import some data, process the data, and save it.
    -The script file (filename.gms) is "loaded" within GM from the menu: "File->RunScript..."
    -REMEMBER - in this example, if you process more than one file, you must unload it before processing the next file or GM will just keep processing everything you feed it until it runs out of resources (memory).

    -Hope this helps.
    --
    Tim
  • Dimitris
    Dimitris Global Mapper User
    edited July 2008
    thanks a lot!!!