Global Mapper Pro Coming Soon

Moving features to an existing layer with a script?

Eagle2Eagle2 Global Mapper UserPosts: 33Trusted 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_bobbmg_bob Global Mapper Programmer Posts: 2,271
    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
  • Eagle2Eagle2 Global Mapper User Posts: 33Trusted User
    Thanks Bob, I'll give that a try and report back.

    Cheers,
    Bryan
  • Eagle2Eagle2 Global Mapper User Posts: 33Trusted User
    That was exactly what I needed. Thanks again Bob!
Sign In or Register to comment.