About geotiff resmaple

Hello all, I'm joining FSX scenery making these days, I got some problem of Geotiff to elevation resmaple so I try to find answer or advice here. Thanks in advanced!

I find a 30m DEM geotiff of Taiwan and want to convert the south-west part of it to elevation data BGL file. But the result is a fully or nearly flatten terrain. I use a small hill (approximate 300m height) to focus trying and got same result.




If someone wish to test the resample result of the geotiff above, here is the download link:

http://www.megafileupload.com/en/file/529880/kh2-rar.html

Does anyone know how to change the inf file for a fairly flatten( low elevation difference) ground for better result?


Sorry for my poor english.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Just looking at the images it doesn't seem so wrong. When you load the bgl in fsx the hill doesn't show?

I'll try to check your file later. One issue could be units. If the data is not using meters as unit you will have to configure the right unit in the inf file.
 
Thank you Sir!

The source of geotiff is a 30m DEM elevation map made by Taiwan government(500mb sized). I open it in global mapper and cut the part I want to use, then export it as geotiff to compile.

My problem is, I got a nearly fully flat bgl file after compiled by resmaple.exe. I can make sure this by open it by tfmviewer. When I load it in FSX, the hill and nearby terrain is all go flatten as shown in tfmviewer.
 
Last edited:

rhumbaflappy

Moderator
Staff member
Resource contributor
The downloadable example was saved as an RGB image, not as elevational data. That is why it is flat.

Dick
 
Hello:

[EDITED]
An important consideration may be necessary when working with Global Mapper due to a change in behavior which was apparently implemented in more recent versions in that program. :pushpin:

It seems that Global Mapper (sometimes) dynamically accepts and defaults to the internal projection settings of a GIS data file in order to import it and display it within the Global Mapper workspace ...even if one has already set the default configuration of Global Mapper to be at "Projection: "Geographic (Latitude / Longitude)", Datum: "WGS84", Planar Units: "ARC DEGREES". :alert:

So when one opens a GIS data file, it may by default be displayed in the same internal projection stored within that file.

To "force" the re-projection in Global Mapper to make the GIS source data display and export in the format required when that data is to be exported for use with the FS SDK, one must again reset the projection during the work session immediately after one's first GIS data file is loaded ...via this procedure:

The correct configuration to set up in Global Mapper before opening a GIS data file or downloading GIS data ...and AGAIN 'after' opening data files when that data is to be "Exported" for use with the FS SDK:

Global Mapper Menu > Tools > Configure... > [Projection Tab]

Projection: "Geographic (Latitude / Longitude)"

Datum: "WGS84"

Planar Units: "ARC DEGREES"

Parameters:

Attribute: "CENTRAL LONGITUDE"

Value: "0"


BTW: As a visual clue that one has 'remembered" to re-project to WGS84 for ex: FS SDK use, the Global Mapper workspace display of the GIS data should compress vertically and rotate counter-clockwise to some extent. ;)


NOTE: Global Mapper is IMHO likely to yield more consistent results when the GIS file which one needs to re-project is the ONLY file loaded in a particular work session; thus it is preferable to not attempt to use that file as one of multiple files which are being turned on and off in the "Control Center" within a work session.

If it is necessary to attempt isolation of a particular GIS file which one needs to re-project and/or export as the ONLY "active" or visible file within a multiple file layer work session, it may be likely to yield more consistent results when that GIS file is loaded FIRST, re-projected, and then load the other multiple file layers afterwards. :pushpin:

[END_EDIT]


Example settings in Global Mapper for export of elevation data

This configuration may work for certain source data file formats in Global Mapper after downloading and opening a GIS elevation data file ...when that data is to be exported for use with FS SDK Resample to output a terrain mesh BGL:

1.) Global Mapper Menu > File > Export > Export Elevation Grid Format...

2.) At 'Select Export Format' prompt, choose "GeoTIFF" from the pick list

3.) In 'GeoTIFF Export dialog, on [GeoTIFF options] tab:

File Type: "Elevation (16-bit integer or 32-bit floating point) samples (=Radio Button 'Ticked')

Vertical Units: "Meters"

Resampling: "Bicubic Interpolation"

Sample Spacing / Scale: (disregard =Automatically filled in by Global Mapper)

Always Generate Square Pixels: (=Checked)

Always Export At The Fixed Scale 1: "0" (=Not-Checked)

DPI Value To Save in Image (0 for None): "0" (=Not-Checked)

Compression: Default (No Compression)

ADVANCED: Use Tile Rather than Strip Orientation: (=Not-Checked)

ADVANCED: JPEG-in-TIFF Quality: "75" (disregard =Automatically filled in by Global Mapper)

Interpolate to Fill Small Gaps in Data: (=Checked)

Generate TFW (World) File: (=Checked)

Generate PRJ File: (=Checked)

Generate OziExplorer .map File: (=Not-Checked)

ADVANCED: Don't Write GeoTIFF Header: (=Not-Checked)


4.) In 'GeoTIFF Export dialog, on [Tiling] tab:

No Tiling - Just One Export File: (=Radio Button 'Ticked')

Skip Existing Files (Use to Complete Cancelled Exports): (=Not-Checked)


5.) In 'GeoTIFF Export dialog, on [Export Bounds] tab:

All Loaded Data: (=Radio Button 'Ticked')

...or:

Click "[Draw a Box...]" button and select desired area from displayed workspace (or specify otherwise via the GUI in that dialog box Tab)


Hope this detail helps with your project ! :)

GaryGB
 
Last edited:
Rhumbaflappy thanks for your reply! I'm too stupid to find what type of tif I needed for resample.

And a lot thanks for GaryGB for your detailed guide! I had successfully make a elevation BGL last night!

The main fault I made is, I think the tif I needed is a colorful bitmap as I see in globalmapper or tfmviewer, not a black picture when opened by a picture viwer.:p

And here is another question, my new elevation map is fairly rough, sloped shore become cliff and landscape height looks like lego. This happened even when I resample to LOD 16 and resample compress rate 97%. Does there anything I can do in global mapper or the inf file?
 
And a lot thanks for GaryGB for your detailed guide! I had successfully make a elevation BGL last night!

And here is another question, my new elevation map is fairly rough, sloped shore become cliff and landscape height looks like lego. This happened even when I resample to LOD 16 and resample compress rate 97%. Does there anything I can do in global mapper or the inf file?
Hi again:

Congratulations on your progress ! :)

Would you please attach a screenshot captured from a FS flight, so we can better understand what results / problems you are describing ?

Also, please include in that same post, your *.INF file used with FSX SDK resample to make the terrain mesh BGL.;)

GaryGB
 
Last edited:
Just a note on this old thread for anyone who finds it looking for answers to a burning question, as above in GaryGB's breakdown of Global Mapper's export settings, if you are creating terrain mesh less than about 30m/pixel, use:

"Elevation (32-bit floating point sampes)"

This is to prevent the integer sampling generating 1m tesselations in lightly sloping data that is very noticable in the sim, especially around an airfield where you are at low altitude.

Be sure to append to your inf file in the [Destination] section:

FractionBits = 2

cheers

Bungo
 
Hello:

Certainly there may be scenarios where one may wish (and actually "need") to utilize 32-bit source data with FS SDK Resample when making terrain mesh BGLs ...as discussed here:

http://www.fsdeveloper.com/forum/threads/discussion-thread-about-the-wiki-article-create-mesh-using-global-mapper.433307/


And certainly the distance between elevation data points on the ground in one's source data would likely be an important determining factor for what bit-depth to utilize in one's elevation source data ...as a separate consideration from the optional use of FractionBits as a parameter in the INF file. :)


However, I believe the necessity to utilize higher bit-depth elevation source data is more likely to occur at much smaller intervals between elevation data points on the ground, than the 30 Meters per pixel example cited above. :alert:


A clue as to the required distance between elevation data points on the ground (as a function of terrain grid vertex density aka "resolution") needed for the FS rendering engine to drape and display terrain textures, can be seen in FSX: :idea:

* set terrain texture resolution slider to 7 cm, and FS automatically sets terrain mesh resolution slider to 10 Meters.


BTW: The relationship between QMID terrain grid Quad / Area Point size and effective resolution of scenery on the ground ...is summarized here: :pushpin:


http://www.fsdeveloper.com/forum/threads/flattens.425495/page-2#post-633002


GaryGB
 
Top