Global Mapper v25.0

How to load a polygon to layer and display in editor

Hi all,

I am stuck at an issue and have been trying numerous things but, I feel as if I am going down the wrong paths so any assistance would be helpful.

In this part of my script, I am attempting to define a bounds poly (to place in a layer in order to reference for cropping later) but I can't seem to figure out how to load said poly into a layer and display it in editor.

Here is my existing method, any pointers would be super appreciated.

// Global Mapper Script to draw a polygon

// Define coordinates

DEFINE_VAR NAME="ULX" VALUE="679994.500"

DEFINE_VAR NAME="ULY" VALUE="3990005.500"

DEFINE_VAR NAME="LRX" VALUE="700005.500"

DEFINE_VAR NAME="LRY" VALUE="3979994.500"


// Define layer name

DEFINE_VAR NAME="LAYER_NAME" VALUE="CropPoly"


//draw rectangle from coords

DEFINE_TEXT_FILE FILENAME="SceneBoundsPolygon"

CLOSED=YES

%ULX%, %ULY%

%LRX%, %ULY%

%LRX%, %LRY%

%ULX%, %LRY%

%ULX%, %ULY%

END_DEFINE_TEXT_FILE

Comments

  • I am not seeing support for utilization of embedded shape files, so I assume I would have to export it as a text file and then import it back into a layer?

    Basically, the script above is just apart of a much larger script that is essentially part of an automated process to build gmw scenes. For this usecase, I am searching the gmw for layers with a *DTM prefix so I can dynamically generate a bounding poly for cropping other features that are being imported that are far too large. I have tried the open .gmw file in a text editor method but, seems like all the embedded data is saves as some encrypted ascii code.

    Will post the solution once I figure it out incase it helps someone else out in the future.