1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

resample.exe "source.inf" file preparation tool

Discussion in 'Tools programming' started by =Hollywood=, 8/1/07.

  1. =Hollywood=

    =Hollywood=

    Joined:
    13/12/06
    Messages:
    497
    Country:
    unitedstates
    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:


    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: 17/2/09
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,241
    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 :).

Share This Page