Combine Terrain Script

Hello,

I wrote simple script to combine two elevation layers. But in Script Results window there is error: "ERROR: No elevation layers with the specified filename...". Could you help me with that?

Script:
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
COMBINE_TERRAIN LAYER1_FILENAME="d:\TEST\15\L0052_1_M01.tif" LAYER2_FILENAME="d:\TEST\16_18\L0052_1_M01.tif" COMBINE_OP=SUBTRACT_SIGNED ELEV_UNITS=METERS

Results:
"Removed all loaded overlays.
Combining Terrain Layers to new layer: Combined Elevation Grid...
ERROR: No elevation layers with the specified filename (D:\TEST\15\L0052_1_M01.TIF) were found."

I checked it also with different GRID formats (.gmg) - the result is the same ("ERROR: No elevation layers with the specified filename...").

Thanks

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,235
    Answer ✓
    What version of Global Mapper are you using?

    Before running your script, did you load all of your data into the main view and put a check next to "Run Script in the Context of the Main View" on the Script Processing window?  If so, I suggest removing the UNLOAD_ALL command.  It removes all of your data (like the File->Unload All menu item in the UI).  The file name parameters in script commands assume that the data has already been imported.

    If you want this to be a stand-alone script, you will need to add statements to import your terrain data before using the COMBINE_TERRAIN command.

Answers

  • I'm using GM 14.2 and it should be stand-alone script (no data in the main view of GM).

    Thanks for suggestion with importing terrain data before - I think that it should be the solution.

    Insist one file, there is possibility to import all files from DIR1 and all files from DIR2, and combine them file by file? (assuming, that files in DIR1 have the same names like in DIR2).

    Thanks!

     
Sign In or Register to comment.