• 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.

Resampling Question

Messages
687
Country
us-texas
I know I seem to be all over this Forum. . .but tryin' to learn with my feeble brain still intact. I am trying to produce an elevation bgl for a project I'd like to do. I have downloaded the data from the USGS, ran that through Global Mapper to produce a "GEOtiff", wrote the "inf" file shown here:
[Source]
Type = GeoTIFF
Layer = Elevation
SourceDir = "Source"
SourceFile = "Marshall_Island"

[Destination]
DestDir = "Output_bgl"
DestBaseFileName = "Island_Elevation"
DestFileType = BGL
LOD = Auto


Placed the source file in it's folder, dropped the inf file on the resample icon and got . . . . ."zip, nada, nothing". The Dos window popped open and closed before I knew it. No output. Solely based on what you see here, is there a flaw in my plan?
 
don't drop the file onto resample. Open the command window, and run resample like an old dos program. Then you will see the error messages. type "resample <path>yourfilename.inf <path>yourfilename.bgl".
 
If I remember correctly, I have to CD\ to the Terrain SDK folder first, then run the resample line correct? If that's correct, then it says; "The system cannot find the path specified". . .I've checked the path and it's typed correctly. I apologize but using DOS is too slow and I'm not a very good typist. . .one error somewhere along the path line and you have to start over and I honestly don't have the patience for that, especially when after a 5 mile long string of path. . .I get this as well: "resample is not recognized as an internal or external command, operable program or batch file."

I appreciate your ability to work within Dos. . .and a long time ago, that's what I learned on and was quite fast. . .but that was 30 years ago and I've slept since then. I'll keep working with it because if based on what I posted as an inf file you saw nothing wrong with that. . .then the problem is somewhere else.
 
lol, wonders never cease. I ran the resample one more time and hit "print screen" simultaneously. . .it captured the split-second it was on-screen, lol.
Screen is as follows:
Resample Info File: 'C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environmental Kit\Terrain SDK\Marshall Island.inf'
[Source] Type='GeoTIFF'
[Source] Type='GeoTIFF'
[Source] SourceDir='Source'
[Source] SourceFile='Marshall Island'
[Source] Layer='Elevation'
TIFFOpen: C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator x SDK\SDK\Environmental Kit\Terrain SDK\Source\Marshall Island: Cannot Open.
Unable to open data source C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator x SDK\SDK\Environmental Kit\Terrain SDK\Source\Marshall Island.
Failed to create data source.
 
Hi Ed:

You may find it helpful to use Arno's excellent "Compile Helper" utility to preserve the output messages from various FS SDK compilers so you won't be mystified by what happened during the brief flash of the CMD mode window which otherwise pops onto the screen then disappears:

CompileHelper 2.0

http://www.fsdeveloper.com/forum/downloads.php?do=file&id=75

After configuring Compile Helper with the paths of any FS SDK compilers you will be using (ex: BGLComp, Resample etc.), just Drag-N'-Drop a *.XML source file (or a *.INF file etc.) onto CompileHelper's *.exe instead of the SDK compiler's *.exe file itself.


[EDITED]

PS: You can also put a copy of Arno's Compile Helper into the work folder along with FSX SDK Resample if you wish. ;)

[END_EDIT]


Hope this helps ! :)

GaryGB
 
Last edited:
Why make life harder than it needs to be?

Make a new folder on your drive c:, named \Compile.

Copy Resample.exe over to the folder above.

Copy your INF and GeoTiff over to the new folder.

Change the SourceDir and DestDir to a period(.), that tells the compiler to look in the same folder as it is in for the source material and to write the BGL file to the same folder. That way things don't get lost... :rolleyes:

But nothing is going to compile because the source name in incomplete. Is the file named Marshall_Island or Marshall_Island.Tif???


If you make a folder with an easy, short name it becomes very easy to open a CMD window (DOS) and to issue the command cd\compile, which then takes you to the C:\compile folder and the DOS prompt. From there you type resample <yourfilename>.inf and you either get a BGL file or you will see the error message in the DOS window as to what went wrong.
 
Hmmm, ok, thanks Gary; After running the inf file to CompileHelper, this is what I got:
The file C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Terrain SDK\Marshall Island.inf is of an unsupported file type. If you think this type should be supported, please report so at the FSDeveloper forum.

Now I wrote the inf file using Notepad and saved with the inf extension. The file icon shows the inf symbology. So I wonder what it is bout the file that it doesn't like?
 
Hi Ed:

I've personally not seen that error message, nor have I seen that reported by others thus far. :confused:


[EDITED]

Did you browse to set up the path to your physical location of the "local copy" of FSX SDK Resample.exe (which is within your "work" folder containing all your source files, Compile Helper, and Resample) in Compile Helper's GUI before trying in Windows Explorer (aka "Computer" in Vista / Win7 or "My Computer" in Win XP) ...to Drag-N-Drop the *.INF file onto the icon for CompileHelper ? :scratchch

IIRC, CompileHelper may pick up the original FSX SDK install location on one's computer, but when a copy of Resample is put into a "work" folder somewhere, it is best to set up the path to that local work folder copy of Resample in the CompileHelper GUI; that way, Resample's output will go into that local folder without using DOS 'batch' commands via a simple Drag-N-Drop process. :spushpin:

[END_EDIT]

GaryGB
 
Last edited:
Gary, the Terrain SDK folder is setup just as it was when the SDK was originally installed, nothing's been touched. Inside the Terrain SDK folder is where resample, Shp2Vec, Imagetool and TmfViwer all reside. I made an "output bgl" folder and a "Source" folder. There is no "Work" folder. The inf file is in the folder with "resample.exe", the source file named in the inf is in the "Source" folder and the inf indicates the the destination folder is "Output bgl". Seems pretty straight forward to me.
 
Hi Ed:

Have you now edited your *.INF file so that the GeoTIFF elevation source data file is named with an explicit file extension ...as Lance advised above ? :confused:

http://www.fsdeveloper.com/forum/showpost.php?p=647799&postcount=6

IIUC, assuming your source file is actually named Marshall Island.tif, one must use delimiter characters for the file name which Resample will accept as input syntax in that *.INF file parameter value field.

For Folder / File / Path names, this delimiter must be the double quotation mark ( " ) and not the single quotation mark ( ' ), thus:

[Source] SourceFile="Marshall Island.tif" ...might be what Resample will act upon; it wants a complete file name with extension.


Also, I'd change the delimiters for all *.INF parameter value fields to a proper ( " ) and not the single quotation mark ( ' ).

Although in the USA these quote characters can generally be used interchangeably (in pairs) when composing hand-written or other text, AFAIK, for purposes of working with the MSFS SDK, we are using special input syntax, which for Folder / File / Path names ...requires use of a ( " ) double quotation mark as a delimiter for value fields.


NOTE: For purposes of MSFS SDK, "Folder" = "Directory", so ex: SourceDir and DestDir refer to folder names


Hope this helps ! :)

GaryGB
 
Last edited:
Well, before you look at the image. . .adding "tif" to the file name (which should have been obvious to me) was all it took. Resample ran the GeoTIFF, produced a bgl and voila' I had just produced my very first mesh. . . . .mmmmm, not so fast. Now take a look at the image, lol. I can laugh, only because with everyone's help I was able to navigate the process and come out the other end with a real live "bgl" file. Obviously my skills are severely wanting, lol.
 

Attachments

  • DXTbmp-2013-aug-22-001.jpg
    DXTbmp-2013-aug-22-001.jpg
    868.9 KB · Views: 530
Hi Ed:

Congratulations on your first mesh ! :cool:

Others have gotten results similar to that seen in your screenie due to older versions of Global Mapper having an internal default for a GeoTIFF export dialog radio button under "File Type" which is set at "8-bit Palette Image"; this is easy to miss when exporting raster data as elevation to a GeoTIFF file format. ;)

http://www.fsdeveloper.com/forum/showthread.php?t=16629


In this FSX SDK Resample terrain mesh BGL scenario, you'd want to instead select "Elevation (16-bit Integer Samples)" under: :idea:

Global Mapper Menu > File > Export Elevation Grid > GeoTIFF > GeoTIFF Options Tab > File Type


Please let us know how that "Elevation (16-bit Integer Samples)" GeoTIFF option setting works for you. :)


PS: Which numeric version of Global Mapper are you using ? :confused:

(see: Global Mapper Menu > Help > About Global Mapper... )


IIRC, prior to version 11 or 12, Global Mapper may navigate to this option via:

Global Mapper Menu > File > Export > Export Raster and Elevation Data > Export GeoTIFF > GeoTIFF Options Tab


GaryGB
 
Last edited:
Thanks Gary! I do remember that in a tutorial I watched on youtube, the guy also mentioned 16bit, however that was grayed out when I ran the export window. I don't know what version of Mapper he was using as this was an older video. I'll give it another shot and see what happens.

Thanks to everyone who put in their 2cents. . .every little bit helps.:D
 
Well, I went back to try to resample the work I had done and I had used up all the exports allowed with the "Time-Limited" free version of Global Mapper, so that's toast. I discovered that the USGS site has a stripped down version available for free. . .oh goodie. Installed that, went through the process again, there was the 16bit option available, got everything ready, export to raster/GeoTIFF, click ok ***This option only available with registered version***. . .so that ones toast as well. . .and NO, I'm not paying $400 for the registration Key.

So I went the convoluted route by using MapWindow to process the data, then "OpenEV" to get the GeoTIFF and then back to the "inf" to process to a bgl file. As near as I can tell. . .it worked. The elevations have changed from default, that much is obvious, so I would have to say. . .this one was a success.
 
My success was short lived, lol. This morning I replaced the default Island with a photoreal replacement. . . .the mesh is no longer working. I've posted the information over in the SBuilderX side of this Forum, with a shot of the Island in question.
 
Back
Top