Moving features to an existing layer with a script?

Eagle2
Eagle2 Global Mapper UserTrusted User
I am writing a script where I would like to create a step which will move all loaded point features from multiple layers into a single existing layer. This seems like a simple enough task, but I can not find any functionality which supports moving features to an already existing layer with GM scripting. Am I missing something?

Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    The EDIT_VECTOR command allows you to select features based on certain criteria, then move them to another layer via the MOVE_TO_NEW_LAYER and NEW_LAYER_NAME parameters. Note that, despite its name, you can specify an existing layer for the NEW_LAYER_NAME parameter, and the features will be copied to that layer.

    Here is an example:
    EDIT_VECTOR MOVE_TO_NEW_LAYER=YES NEW_LAYER_NAME="Major Highways" \
     COMPARE_STR="CLASS=1"
    Cheers,
    Bob
  • Eagle2
    Eagle2 Global Mapper User Trusted User
    Thanks Bob, I'll give that a try and report back.

    Cheers,
    Bryan
  • Eagle2
    Eagle2 Global Mapper User Trusted User
    That was exactly what I needed. Thanks again Bob!