Global Mapper v25.0

COMBINE areas in script & move features to new layer

paul.bade
paul.bade Global Mapper UserTrusted User
edited November 2014 in GM Script Language
Hi,

I didn't find a way to combine areas in a script. Did I miss something or is this not implemented yet?

Likewise it should be possible to move selected features to a new layer, but how?

Regards,
Paul

Comments

  • global_mapper
    global_mapper Administrator
    edited April 2014
    Paul,

    There isn't currently a way to combine areas in a script. Would you like some perhaps like the COMBINE_LINES script command (Global Mapper Scripting Reference) where you specify which areas to combine based on a COMPARE_STR parameter that allows attribute searching?

    For new layer creation via script currently the SPLIT_LAYER (Global Mapper Scripting Reference) command is all that is available in a script.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • paul.bade
    paul.bade Global Mapper User Trusted User
    edited April 2014
    Hi Mike,

    sorry for the late reply. Yes, something like COMBINE_LINES for areas would be helpful. And moving selected features to a new layer without the need to split the complete layer would be great. The workaround to first assign attributes to selected features before splitting and then removing the attributes again is a bit inconvenient.

    Both isn't too urgent for me, but would be nice to have after the next update.

    Thanks,
    Paul
  • global_mapper
    global_mapper Administrator
    edited April 2014
    Paul,

    I've added new todo items for these, items 13625 and 13626. We will post here when they are available in a build.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • global_mapper
    global_mapper Administrator
    edited May 2014
    There is now support for copying/moving features to a new layer with the EDIT_VECTOR command. Here are the new supported parameters:

    COPY_TO_NEW_LAYER - specify COPY_TO_NEW_LAYER=YES to have the results (features) of the EDIT_VECTOR command copied to a new layer. If you use this parameter, but do not specify a value, then YES will be assumed.

    MOVE_TO_NEW_LAYER - specify MOVE_TO_NEW_LAYER=YES to have the results (features) of the EDIT_VECTOR command copied to a new layer, and then deleted from their original layer. If you use this parameter, but do not specify a value, then YES will be assumed.

    NEW_LAYER_NAME - Indicates the name of the layer where the features will be copied or moved. If a layer with this name already exists, then that layer will be used, otherwise, a new layer will be created.

    NEW_LAYER_PROJ - Indicates the projection to be used in the new layer. If this parameter is not specified, then the new layer will use the current global projection.

    Example (assumes a layer with a CLASS attribute has been loaded):

    EDIT_VECTOR MOVE_TO_NEW_LAYER NEW_LAYER_NAME="Major Highways" \
    COMPARE_STR="CLASS=1"

    In this example, all features where the CLASS attribute has a value of "1" will be moved to a new layer called "Major Highways".

    I have placed new builds with the latest changes at the links below:

    32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip
    64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip

    Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:

    32-bit: C:\Program Files (x86)\GlobalMapper15
    64-bit: C:\Program Files\GlobalMapper15_64bit

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • falqn
    falqn Global Mapper User Trusted User
    edited November 2014
    Hi,
    For me it will be very useful to have COMBINE_AREAS command in scripting language. Any progress on this issue?
    Regards
    Wojtek
  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited November 2014
    Hello Wojtek,

    The COMBINE_LINES functionality was implemented, but not COMBINE_AREAS. I have added feature request 14891 to our task list so we can evaluate implementation in a future version of Global Mapper.

    Cheers,

    Bob
  • paul.bade
    paul.bade Global Mapper User Trusted User
    Hello,

    any news here? I was hoping for a COMBINE_AREAS in scripting in GM 16. Any workaround possible?

    Regards,
    Paul
  • bmg_bob
    bmg_bob Global Mapper Programmer
    There has been no change in status for feature request #14891.
  • paul.bade
    paul.bade Global Mapper User Trusted User
    Hi Bob,

    it seems that this was still not implemented? Any plans to do so in the near future?

    Cheers,
    Paul
  • Eagle2
    Eagle2 Global Mapper User Trusted User
    Just checking in to see if there was ever any traction on this request? I could also use a COMBINE_AREAS script function. 
  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    The feature request for a COMBINE_AREAS script command is in the queue for inclusion in Global Mapper 23. That is not a guarantee, but I think it has a good chance of getting in. We are using new feature tracking software, and the issue number is now GM-2979.

    Cheers,
    Bob