Move points through layers

AlbinoFabioAlbinoFabio Global Mapper UserPosts: 6
edited June 2014 in GM Script Language
Good morning, I need to create a script that move some points from a file .xyz to other layers after features selection.
What's the right command to move point with GM15? Edit_vector?

Thank you
Fabio

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited June 2014
    Fabio,

    In v15.2 you can use the EDIT_VECTOR command to move matching features to a new layer. See the parameters like COPY_TO_NEW_LAYER and MOVE_TO_NEW_LAYER at Global Mapper Scripting Reference.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • AlbinoFabioAlbinoFabio Global Mapper User Posts: 6
    edited June 2014
    Thanks Mike, but there's something wrong in my script and it doesn't work.

    This is my script:
    GLOBAL_MAPPER_SCRIPT VERSION=1.00
    EDIT_VECTOR MOVE_TO_NEW_LAYER=YES NEW_LAYER_NAME="Destinazioni" COMPARE_STR="Livello=A"

    and this is the err:
    Editing vector features...
    ERROR: No layers matching <*> for EDIT_VECTOR.
    Be sure to provide the full path and filename or the description for the loaded file to use, or * for all files

    I have only one layer loaded, named "Punti da spostare.shp". It contains points and one of they has an
    attribute with name Livello and value A.



    Thanks bye
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited June 2014
    Did you run your script with the File->Run Script menu command? If so, be sure to check the box to run the script in the context of the main map view, otherwise any loaded data won't be available for use in the script.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • AndreaRAndreaR Global Mapper User Posts: 58Trusted User
    edited June 2014
    Hi Fabio,

    Try this

    EDIT_VECTOR FILENAME="Punti da spostare.shp" SHAPE_TYPE="POINTS" COMPARE_STR="Livello=A" MOVE_TO_NEW_LAYER=YES NEW_LAYER_NAME="Destinazioni"

    Ciao

    Andrea
  • AlbinoFabioAlbinoFabio Global Mapper User Posts: 6
    edited June 2014
    Thanks Mike it was the check box and thanks to AndreaR too for his suggestion.
    Bye
    Ciao bello
Sign In or Register to comment.