• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

resample.exe "source.inf" file preparation tool

Messages
857
Country
australia
I'm trying to find a way through my own research a way to start a batch process that will:


  1. 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:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,941
Country
netherlands
Hi,

If I had to do this, I would probably write a little tool to do this work for me. Just a quick tool with an ugly GUI to create the file I want. But usually I don't release such tools in the end :).
 
Top