Global Mapper v24.1

Batch mode for exporting layer by layer

Mirko
Mirko Global Mapper User
edited December 2012 in Suggestion Box
Hi there,

I would suggest for implementing a feature that you can select and export layer by layer.

That means, you should be able to select via scripting only one layer and export them, then the next layer and so on. More or less a batch mode and the capability for choosing only one layer out of more than one layer.

This could be also very helpful for scripting some basic macros for a huge amount of data. For example, if you want to calculate coverages you can input a csv file and then a script should calculate the coverage for each point and export them layer by layer as a raster image format, e.g. GeoTIFF or PNG.


Kind regards,
Mirko

Comments

  • global_mapper
    global_mapper Administrator
    edited August 2012
    Mirko,

    You can already loop through a collection of files in a script using DIR_LOOP_START...DIR_LOOP_END. Would it maybe be helpful to have something like a SET_LAYER_OPTIONS command that would let you apply any of the options set with an IMPORT command (including disabling/hiding a layer) after the layer is already loaded? There could be an option to apply the options to all layers, allowing you to easily show/hide all layers at once, then turn just a particular one back on? Or maybe even a new kind of looping, like LAYER_LOOP_START...LAYER_LOOP_END for looping through all loaded layers and doing something?

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Mirko
    Mirko Global Mapper User
    edited August 2012
    Mike,

    Thanks for your fast answer. The LAYER_LOOP_START...LAYER_LOOP_END - option would be very useful. You can reduce your workspace to interesting layers only and then loop through each layer and export them one by one and use the layer name as the new file name.

    Of course also the SET_LAYER_OPTION makes sense, for example with a wildcard-combined layer name but for my point of view it has currently lower priority.


    Thanks,
    Mirko
  • global_mapper
    global_mapper Administrator
    edited September 2012
    Mirko,

    Ok I've added this to the todo list and will hopefully get in v14.0.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Mirko
    Mirko Global Mapper User
    edited September 2012
    Great news!

    Looking forward to try out version 14 of Global Mapper.
  • Mirko
    Mirko Global Mapper User
    edited December 2012
    Hi Mike,

    I've tested this requested functionality with GM 14 but it doesn't fulfill my requirements. Unfortunately I used the wrong word 'layer', what I want is a loop over an amount of 'overlays'. That means, you have made several coverage calculations and see all of them in the overlay control center. Now it would be good if you can hide all overlays, loop over them and export only one selected overlay as a file (i.e. GeoTiff). The layer_loop_start .. layer_loop_stop is still working, but I have an issue for selecting the right overlays for export.

    Have you an idea how this could be done?

    Thanks,
    Mirko
  • global_mapper
    global_mapper Administrator
    edited December 2012
    Mirko,

    The term 'layer' in this case is equivalent to 'overlay', they each represent a single loaded file. What you need is 2 loops, one to loop over all layers and hide them, then another to loop over the files and enable, export, then disable each one. Like the sample script at http://www.globalmapper.com/helpv14/ScriptReference.html#cmd_layer_loop_start.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com