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

GeoTIFF Mesh

Messages
305
Country
us-california
After reading the SDK and examining the example Death Valley file given, I have tried to create mesh for FS-X with the latest resampler using a GeoTIFF file.

From USGS Seamless I download NED 1" and modified it to be saved as GeoTIFF. Then I set up everything just as the Death Valley one, with the TIFF in the SourceData folder and such.

When I run it through resampler the window flashes fast and then exits. No BGL is created at all.

Am I missing something here?

Also, what is the highest resolution mesh possible in FS-X and where can I download that data?

Thanks!

-Kobbe
 
It might be best if you opened a command window, then cd (change directory) to the directory that contains your source directory and then run resample directly on the command line and then check the (error) output.

Alternatively, I would create a batch file and a shortcut as follows and then drag&drop the .inf file onto the shortcut:

Create a Batchfile (name it e.g. resamp.bat and put in c:\):
(You need to put your own FSX-SDK path in here)
---------------------------------------------------------
@echo off
%~d1
cd %~p1
"E:\FSX-SDK\SDK\Environment Kit\Terrain SDK\resample.exe" %~nx1
pause

Create a shortcut and in 'Target' put:
------------------------------------
%SystemRoot%\system32\cmd.exe /C c:\resamp.bat

HTH,
- Siggy
 
Last edited:
Edit the INF...

Hi, Skubakobe

You must edit the file:
DeathValley_Elevations.inf
to fill your particular example and put the image in the folder you named at SourceDir in the inf file. Also, the bgl will be created in the folder DestDir you gave the name in the inf file.

See the inf code below, where:

SourceDir = "SourceData"
DestDir = "Output"

Those folders were created by FSX SDK in your computer.

Code:
[Source]
Type                = GeoTIFF
Layer               = Elevation
SourceDir           = "SourceData"
SourceFile          = "DeathValleyTif.Tif"

[Destination]
DestDir             = "Output"
DestBaseFileName    = "DeathValley_Elevations"
DestFileType        = BGL
LOD                 = Auto

Regards,

José
 
Jose,

I realized that and instead of messing with the INF file I just threw my TIFF file in to their example "SourceData" folder and everything accordingly. I also did it by editing it to my custom source folders but that didn't work either.

Siggy,

I couldn't figure out your first suggestion and your second suggestion was just a long run around dragging and dropping it on to resampler.exe itself. Both flashed up and went away real quick. By dropping it on the BatchFile I get the error:

"couldnt create source data"

I'm guessing my GeoTIFF is invalid?
 
Ok here's the error I got:

TIFFOpen: C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\
Environment Kit\Terrain SDK\SourceData\CatalinaTif.Tif: Cannot open.
Unable to open data source 'C:\Program Files\Microsoft Games\Microsoft Flight Si
mulator X SDK\SDK\Environment Kit\Terrain SDK\SourceData\CatalinaTif.Tif'.
Failed to create data source.
 
Hi scubakobe.

It's nearly impossible to find the cause without seeing the source file.

The only thing I can think of is the source, whether DEM or imagery, must be simple Geographic Projection ( lat-long ) with WGS84 Datum.

Dick
 
Hi, Jon

And the *.ini file, too.

I suggest, for this first time, to use the same ini file and folders. Rename (or move) the original FSX SDK geotiff file and put yours there, with the name of the original file renamed (or moved).

Ty to compile, again.

José
 
Ok, I tried your suggestion Jose but that didn't work either.

The next thing I did was redownload the TIFF to make sure the other wasn't corrupted. That one didn't work either. So I then downloaded it in BIL format and changed Source Type to "Raw" and that didn't work either.

What could MS have done differently?

Also, my area being downloaded is rather small. 10-15 miles across I think, and is 10M resolution.

The file is 60 MB so it's taking awhile to upload, when I get back from :teacher: I will provide a link if you need it.
 
Hi,

I have a lot of different data from seamless server on the disk so tried reproduce your experiment with the tif format, it was SRTM 3s tile N50W100. In GlobalMapper the format is the same as the format of the FSX SDK example (32 bit GeoTiff). The inf from SDK resample after small modification:

Source
Type = GeoTIFF
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "64318997.tif"

Destination
DestDir = "Output"
DestBaseFileName = "Seamless"
DestFileType = BGL
LOD = Auto

The resampling was without problems, it created bgl with multilod terrain LOD 1 – 9, visible in TmfViewer, so no idea for your data, hmm :confused:

Cheers

Vlada Stoje

PS: Did you tried the difference between dimension 0.00028 and 0.00027777777 in the older thread?
 
Ok I tried using SRTM mesh and sure enough it worked.

SRTM isn't high enough resolution, though. So I conclude that resample.exe is not capable of handling any NED's which are the type I am using. (NED 1/3 to be exact)

I guess I will have to do it with FS9 tools and transfer it over.
 
Ok..


I tried it using the traditional FS9 method with the FS9 tools and that didn't work either!

I have done this before so theres no reason it shouldnt be working. Any explanations?

What else can I use for 10M or better mesh?

Thanks
 
All previous techniques do not work. It seems to be that any NED won't work now. Is my download area too small? Maybe that's a possibility.


Here's my INI file for FS9:

Destination]

LOD = Auto


DestDir = "C:\xxx"


DestBaseFileName = "cat_mesh"


UseSourceDimensions = 1

[Source]
Type = ElevS16LSB
SourceDir = "C:\xxxx"
SourceFile = "NED_14573180.bil"
Lat = 33.51625000
Lon = -118.63680556
NumOfCellsPerLine = 1353
NumOfLines = 947
CellXdimensionDeg = 0.00028
CellYdimensionDeg = 0.00028
ScaleinMeters = 1.0
 
My Inf

Hi, Skubakobe

I compiled this inf file to create a Mesh in FS9, using SRTM, for the whole South America. Search for MeshX in AVSIM.


Code:
[Destination]	
LOD =	Auto
DestDir =	"."
DestBaseFileName =	"MeshX_B1"
;UseSourceDimensions =	1
;COORDENADAS DA IMAGEM: 	
NorthLat =	11.2500000001
WestLon =	-71.25
SouthLat =	5.624999999999
EastLon =	-63.75
; ---------------------------------------------	
[Source]	
Type = 	ElevS16LSB
SourceDir =	"."
SourceFile =	"MeshX_B1.bil"
CellType =	S16LSB
NullCellValue =	-9999
Lat =	+11.24999999999900
Lon = 	-71.25
;DIMENSÕES DA IMAGEM (em pixels):	
NumOfCellsPerLine = 	9001
NumOfLines = 	6751
CellXdimensionDeg = 	8.333333333333330E-04
CellYdimensionDeg = 	8.333333333333330E-04
ScaleinMeters         =	1.0

José
 
I know SRTM works, tried that.
SRTM gets above 30M mesh. NED 1" gets 30M, NED 1/3" gets 10M. I want 10M mesh and since I have done it before with NED 1" I don't see why NED 1" doesn't work anymore.

I think the USGS seamless site is giving out corrupted files, although they appear correct in Global Mapper.

Ah... computers.

Thanks though
 
CellXdimensionDeg

Hi, Skubakobe

The code below has a different value for CellXdimensionDeg, because the resolution is 10m.

I think you know how to calcul this value for your inf file.

José


Code:
[Destination]	
LOD =	Auto
DestDir =	"."
DestBaseFileName =	"MeshUtah_X2"
;UseSourceDimensions =	1
;COORDENADAS DA IMAGEM: 	
NorthLat =	41.250000001
WestLon =	-112.50000000
SouthLat =	39.3749999999
EastLon =	-109.6875
; ---------------------------------------------	
[Source]	
Type = 	ElevS16LSB
SourceDir =	"."
SourceFile =	"X2.bil"
CellType =	S16LSB
NullCellValue =	-9999
Lat =	41.250000001
Lon = 	-112.50000000
;DIMENSÕES DA IMAGEM (em pixels):	
NumOfCellsPerLine = 	11328
NumOfLines = 	7552
CellXdimensionDeg = 0.000248296220
CellYdimensionDeg = 0.000248296220
ScaleinMeters         =	1.0

The best program to work with georeferenced images is globalmapper or its free version DLGV.

Regards,

José
 
partial success with the seamless NED 1/3s

Hi all,

I tried to download small piece of the NED 1/3s, first in the tif format, and I can also confirm the Skubakobe experience. In GlobalMapper perfect data (but in projection NAD83!), and the FSX SDK resampler didn’t accept it. It seems that Dick is right, that the resamplers need always only strictly the WGS84 (despite it is almost identical). Then tried download the same piece in bil format – significantly smaller file, because the numerical precision is only 1.0m (in the tif 0.3 m or one feet). With this inf file

Source
Type = ElevS16LSB
Layer = Elevation
SourceDir = "SourceData"
SourceFile = "97466024.bil"
Lat = 40.25
Lon = -100.25
NumOfCellsPerLine = 2701
NumOfLines = 2701
CellXDimensionDeg = 9.25925926e-5
CellYDimensionDeg = 9.25925926e-5


Destination
DestDir = "Output"
DestBaseFileName = "Seamless_ned13_bil"
DestFileType = BGL
LOD = Auto

it was no problem for FSX resampler, it created multilod bgl with LOD 3 - 12. Sorry I don’t know how to edit the GeoTiff header and rewrite the NAD83 to WGS84 there :(

cheers

Vlada Stoje
 
Hi Vlada.

I'm pretty sure this has been discussed before... perhaps not on this forum. GeoTiff must be WGS84 or resample will choke on it.

If someone already owns GlobalMapper, it's trivial to reproject the data to WGS84, and save it as a new GeoTiff.

Dick
 
Last edited:
Hi,

Thanks for the suggestions.

In the FS9 area I just need to change the Celll dimensions, I forgot to do that. I knew I forgot something!

I will try changing the NAD83 format to WGS84 if possible.

THanks for the suggestion,

kobbe
 
Back
Top