Scripting to merge maps from different folders
Digaudma
Global Mapper User
Hello!
I would need help to write a script doing the following.
I have:
- Folder_name1
+ file_tiff1
+ file_tiff2
+ file_tiff3
...
- Folder_name2
+ file_tiff1
+ file_tiff2
+ file_tiff3
...
etc
I would like to merge all the files inside each folder separately. So, to have:
- Folder_name1.tiff (which is the merge of all tiff in the Folder_name1)
- Folder_name2.tiff (which is the merge of all tiff in the Folder_name2)
- etc
I would like to do this with a script because I have a lot of folders and it would take lot of times manually.
I read the script manual, but it is quite complex to start with and to know if we can loop over folder present in a directory etc
help appreciated :-)
Marc
I would need help to write a script doing the following.
I have:
- Folder_name1
+ file_tiff1
+ file_tiff2
+ file_tiff3
...
- Folder_name2
+ file_tiff1
+ file_tiff2
+ file_tiff3
...
etc
I would like to merge all the files inside each folder separately. So, to have:
- Folder_name1.tiff (which is the merge of all tiff in the Folder_name1)
- Folder_name2.tiff (which is the merge of all tiff in the Folder_name2)
- etc
I would like to do this with a script because I have a lot of folders and it would take lot of times manually.
I read the script manual, but it is quite complex to start with and to know if we can loop over folder present in a directory etc
help appreciated :-)
Marc
Comments
-
The scripting language does not currently have any kind of looping mechanism. However, you could use the IMPORT_DIR_TREE command to import all of the files in a particular folder, then use the EXPORT_RASTER command to export them to a new file. The import could could look like the following:
IMPORT_DIR_TREE DIRECTORY="C:\Folder_name1" FILENAME_MASKS="*.TIFF"
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 13K All Categories
- 5.8K Features Discussion
- 351 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 422 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 182 Announcement and News
- 944 Bug Report
- 565 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 582 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website
