Batch mode for exporting layer by layer

Mirko
Global Mapper User
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
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
-
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 -
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 -
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 -
Great news!
Looking forward to try out version 14 of Global Mapper. -
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 -
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
Categories
- 12.5K All Categories
- 5.5K Features Discussion
- 314 Downloading Imagery
- 1.3K Elevation Data
- 377 Georeferencing Imagery Discussion
- 611 GM Script Language
- 50 User Scripts
- 112 GPS Features
- 397 Projection Questions
- 805 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 161 Announcement and News
- 893 Bug Report
- 557 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 546 Other Discussion
- 128 GIS Data Sources
- 26 Global Mapper Showcase
- 230 How I use Global Mapper
- 104 Global Mapper Forum Website