Batch Geotiff/JPG Conversions
Hi,
I'm trying to figure out the best GM tools to accomplish the following:
- find all the tiff & jpg files that are within a nested directory structure
- For each file, determine it's coordinate system
- Based on it's current coordinate system, set the projection
- save the new image file (one per source image)
I think the best would be to create a perl script (or something like that) to recursively go through the nested directory and find the tif or jpg file. Then call a GM script for the one file.
That brings up some questions.
- is the only way to read the current coordinate system is to export a prj?
- can I pass in parameters to the GM script (ie the source filename).
I guess I could have the wrapper script generate the GM script on the fly as it finds the image file. The biggest question is do I have to create a prj, read it and then load the new projection. If that is the case I think I would have to have two seperate GM scripts created on the fly (one to create the prj) and the second one to load the new projection and save the new file.
Hopefully that's clear! If anyone can give me any suggestions I would really appreciate it.
Thanks,
Kathy
|