- Messages
- 857
- Country
-
I'm trying to find a way through my own research a way to start a batch process that will:
Basically I have a few hundred source geotiffs that I don't want to have to hand compile the resample.exe based .inf files for...
Example:
so basically my folder has:
Z_59_17.TIF
Z_59_18.TIF
Z_59_19.TIF
etc etc etc with 49 files named similar to this...
Now if I can run a batch file that will list those files and plug them in to each
(Source3)
Type = GeoTIFF
SourceDir = "Source"
SourceFile = "Z_59_19.TIF"
Layer = Elevation
Scale = 1
MaxValidData = 5000
MinValidData = -5000
the line listed in red above, while also appending a source number in green and then counting the number of sources altogether and adding the number to the line in blue below:
(Source)
Type = MultiSource
NumberOfSources = 49
Then I'll be able to do a lot of quick rendering for DEM and photoscenery etc, and would be a very useful tool for all of us....
Anyone have any ideas?
Scan a directory
List the directory contents to a text file
Append the data into a source.inf file ready to compile with resample.exe
Basically I have a few hundred source geotiffs that I don't want to have to hand compile the resample.exe based .inf files for...
Example:
(Source)
Type = MultiSource
NumberOfSources = 49
(Source1)
Type = GeoTIFF
SourceDir = "Source"
SourceFile = "Z_59_17.TIF"
Layer = Elevation
Scale = 1
MaxValidData = 5000
MinValidData = -5000
(Source2)
Type = GeoTIFF
SourceDir = "Source"
SourceFile = "Z_59_18.TIF"
Layer = Elevation
Scale = 1
MaxValidData = 5000
MinValidData = -5000
(Source3)
Type = GeoTIFF
SourceDir = "Source"
SourceFile = "Z_59_19.TIF"
Layer = Elevation
Scale = 1
MaxValidData = 5000
MinValidData = -5000
so basically my folder has:
Z_59_17.TIF
Z_59_18.TIF
Z_59_19.TIF
etc etc etc with 49 files named similar to this...
Now if I can run a batch file that will list those files and plug them in to each
(Source3)
Type = GeoTIFF
SourceDir = "Source"
SourceFile = "Z_59_19.TIF"
Layer = Elevation
Scale = 1
MaxValidData = 5000
MinValidData = -5000
the line listed in red above, while also appending a source number in green and then counting the number of sources altogether and adding the number to the line in blue below:
(Source)
Type = MultiSource
NumberOfSources = 49
Then I'll be able to do a lot of quick rendering for DEM and photoscenery etc, and would be a very useful tool for all of us....
Anyone have any ideas?
Last edited: