Script Import/Export one Geotif at a time
scotcht
Global Mapper UserTrusted User
I have hundreds of geotiff files that are seperated in folders by photo capture date. When loading one folder of tifs, they look right, but when adding another folder of tifs, the color and contrast change for all loaded tifs. i assume there's info embedded in the acquired data that fight eachother when loading together.
Basically, I need to be able to load all the data together, and do it accurately. To remedy, I've started loading all data from one folder, exporting it again as a Geotiff with desired settings. I've tested it, and the data loads together without effecting eachother. I have some 100+ folders, so this method will take forever. I've written scripts before, but it's been a long time.
I need to either figure out the color issue or write a script that will load each tif from every folder individually, re-export it, then close it. Any help getting started will be appreciated!
-Scott
Basically, I need to be able to load all the data together, and do it accurately. To remedy, I've started loading all data from one folder, exporting it again as a Geotiff with desired settings. I've tested it, and the data loads together without effecting eachother. I have some 100+ folders, so this method will take forever. I've written scripts before, but it's been a long time.
I need to either figure out the color issue or write a script that will load each tif from every folder individually, re-export it, then close it. Any help getting started will be appreciated!
-Scott
Comments
-
Scott,
The contrast settings will default to sharing the contrast settings with all loaded data layers. If you go to the color/contrast settings tab of the Options dialog for loaded layers you can turn that off so that each image will be separately contrast adjusted (or you can turn off adjustment altogether if you want).
If you need to share contrast adjustment between separate groups of images, you could do this in a script by using DIR_LOOP_START and DIR_LOOP_END to loop over the images in a folder, use IMPORT to load each one with CONTRAST_MODE=PERCENTAGE and CONTRAST_SHARED=YES in the parameters, then after the loop finishes use EXPORT_RASTER to export that to a new image and UNLOAD_ALL to unload everything.
See Global Mapper Scripting Reference for details on scripting. If you have separate groups of folders to process I would actually have a DIR_LOOP_START...DIR_LOOP_END to wrap everything and use FILENAME_MASKS=".." for that one so you hit each folder once, then have a nested loop in that for each folder to do everything in the previous paragraph.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
http://www.bluemarblegeo.com/
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website