Having troubles with Airport Mesh

Hi Tony:

I discovered issues of elevation data set discontinuity in a GeoTIFF mesh source derived from the IGN *.ASC LiDAR file.

These are issues distinct from any initially suspected SDK Terrain Grid LOD Quad extent *.INF parameter values.

I had been testing only at the airport, and had not yet flown around a full extent of coverage for the IGN *.ASC LiDAR file.

Now that I have flown around a full extent of coverage for the IGN *.ASC LiDAR file, in spite of having allowed GM to "Interpolate to Fill Small Gaps in Data ", there appear to be areas of missing elevation data points too large for that GM interpolation routine to fill in (often referred to as "data voids"), which results in terrain rendering anomalies of 'spikes' and 'pits' in FSX / P3D at run time. :banghead:

These require special procedures to fix via a "void fill" process using another data set.

I will need to so some further work with this data set to see if there may be a method which is both time efficient, and effective to resolve these data set issues, so regrettably, I shall not be posting the 'work-flow' info quite yet. :oops:


While it is possible one could use certain instructions within the *.INF file to tell SDK Resample to only use a smaller section of this overall data set for the area immediately adjacent to the airport (which does not seem to show these data set anomalies), it is my assumption that you would want to provide a larger coverage area of enhanced terrain mesh surrounding the airport, and to perhaps even provide the entire extent of the IGN *.ASC LiDAR file as a terrain mesh enhancement.

I do plan to work on this further to offer practical suggestions for you; however, this will be a 3-day holiday weekend in USA, so I may not have any more available time until Tuesday to explain how to implement a (now more complex) 'corrective' work-flow for more completely utilizing this data set.

[EDITED]

BTW: If you also wish to export this IGN data set to a Elevation Grid GeoTIFF source file in GM, you must:

* Open PNOA_MDT05_ETRS89_HU30_0223_LID.asc

* Set GIS projection format for PNOA_MDT05_ETRS89_HU30_0223_LID.asc to:

PROJ_DESC=UTM Zone 30 / ETRS89 / meters
PROJ_DATUM=ETRS89
PROJ_UNITS=meters
EPSG_CODE=EPSG:3042

Next, prior to GM Export:

* Set GIS projection format to (EPSG:4326)


...and during GM Export:

* Output a 32-Bit Floating Point GeoTIFF file format

* Set Vertical Units to Feet


...then, during compilation, in the *.INF:

* Use FractionBits=3

* Use LOD=AUTO


Sorry to see that this aspect of your project infrastructure may incur additional delay, but I am confident that a satisfactory resolution may be achieved soon. :duck:

Hopefully other tasks such as color-matching, seasonal / night texture variations, and Autogen annotation etc. may hold your interest until early next week, if I do not otherwise have a chance to post the 'work-flow' any sooner. :)

[END_EDIT]

GaryGB
 
Last edited:
Hi Tony:

GOOD NEWS !:D

I was able to achieve a quick 'void fill' using SRTMv3 ''void filled' 1-Arc Second / 30 Meter elevation data.

No APX45160.bgl or CVX4516.bgl loaded... just IGN LiDAR Mesh and SBuilderX LOD-18 ( 0.15 Meter / 15 cm ) imagery. :pushpin:

And ...no SPIKES or PITS seen thus far. :cool:





I will need to do some further inspection and testing to see if the initial SRTMv3 'void fill' was sufficiently effective to resolve these data set issues, so I shall still require a bit more time before I post the final 'work-flow' info. ;)

But, this is an auspicious indicator for your successful use of the "corrected" data set fairly soon. :)


GaryGB
 

Attachments

Last edited:
Oh wow man that is great. I think you managed to figure it out! Hahaha, now I really hype to delve into your workflow. Don't worry if you can't post during these incoming holidays. In the meantime, I will be working on other projects as well as color grading the imagery . Thanks a lot for your help, I appreciate it a ton, and this is going to be super useful to other people dealing with the same issues. I will also give it a try to it with the new edits that you have mentioned.
 
Hi Tony:

Because FSDeveloper forums deleted my pending post (previously saved repeatedly as a "Draft"), my schedule for getting 'work-flow' info online for you will now take longer than I had intended. :banghead:

I had found a few hours over the weekend in a few snippets of available time, to compose a substantial portion of the 'work-flow' info which would have been posted much sooner, had I not 'trusted' the Xenforo software as used here at FSDeveloper ...to be reliable.

Regrettably, I had not kept a backup of that pending content offline, so I must "start over".:duck:

So, I may still be unable to post more info for you until Tuesday (as I had originally anticipated due to the holiday).

I hope your other activities are otherwise proceeding without any disruptions, and that you maintain BACKUPS. :pushpin:

GaryGB
 
Last edited:
Hi Tony:

After the holiday weekend, I shall need to catch up on a few other matters before I "Start Over" on the promised work-flow .

I anticipate resuming that task tomorrow, and am pleased to have found a superb offline utility to edit existing copies of Windows Clipboard copied forum HTML, which can then be output as BBcode for use in forum posts. :wizard:

Hopefully this will proceed more quickly in a full-size editing screen assisted by my voice recognition software. ;)

...More to come soon... :)

GaryGB
 
Last edited:
That sucks and don't worry I will patiently wait for it. Hahaha but it seems you got a fancy way to write that essay with your S2T software ;)
 
Hi Tony:

Here is a "worked example" using Global Mapper (aka "GM") with the LiDAR source file cited in our posts above. :teacher:

In Global Mapper GUI:


1.) GM Menu > File > Open Data Files... > browse / select: PNOA_MDT05_ETRS89_HU30_0223_LID.asc

a.) Click: [Open] button

b.) At "Unknown Projection" Prompt, click: [OK] button > ( Select Projection for NOA_MDT05_ETRS89_HU30_0223_LID.asc dialog opens )

c.) In 'Select Projection' dialog > {Projection} tab > Verify GIS projection values inferred by GM are set as follows:

Projection: UTM (aka "Universal Transverse Mercator")

Zone: 30 (6° W - 0° W Northern Hemisphere) <-- If not 30, set to 30

Datum: ETRS89

Planar Units: METERS

Vertical Units: FEET <-- If not FEET, set to FEET

Parameters: (Attribute / Value)

CENTRAL MERIDIAN SCALE FACTOR: 0.999600000
CENTRAL MERIDIAN: -3.00000000
ORIGIN LATITUDE: 0.00000000
FALSE EASTING: (m): 500000
FALSE NORTHING (m): 0

d.) click: [OK] button

NOTE: GM work-space GUI should now load the IGN LiDAR elevation data and display it via a color Atlas Shader


2.) One must now re-project that LiDAR source data via GM into the format required for use with FS SDK Resample:

a.) GM Menu > Tools > Configure... > Projection > {Projection} Tab > Search By EPSG Code > type: 4326 > click: [OK] button

b.) Verify re-projection values are set as follows::

Projection: "Geographic (Latitude / Longitude)"

Datum: "WGS84"

Planar Units: "ARC DEGREES"

Parameters: (Attribute / Value)

CENTRAL LONGITUDE: "0"


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

c.) click: [OK] button


FYI: PNOA_MDT05_ETRS89_HU30_0223_LID.asc has elevation "data voids" when test compilations were inspected in FS, so one must use GM's built-in direct download feature to access 3rd party data for the current extent of that LiDAR coverage area ...to fill voids:


3.) GM Menu > File > Download Online Imagery / Topo / Terrain Maps... < 'Select Online Data Source' dialog opens >

a.) In 'Select Online Data Source to Download' dialog:

(1) In 'Select Data Source' pick-list:

(a) Click: [+] TERRAIN DATA

(b) Select SRTM Worldwide Elevation Data (1-arc-second Resolution, SRTM Plus V3)

(2) Under 'Select Area to download' > tick: "Current Screen Bounds"

(3) Under 'Display Options':

(a) Resampling Methods: pick: Bilinear Interpolation

(b) Check: "Restrict Source to Selected Bounds"

(c) Detail Level slider: More (16.00 )

(4) Click [Connect] button


You should now have 2 color layers of data displayed in GM's work space and listed in GM's Overlay Control Center:


4.) GM Menu > Tools > Control Center... < 'Overlay Control Center' dialog opens >

a.) In Overlay Control Center dialog:

(1) Left Mouse button Click+Hold+Drag: PNOA_MDT05_ETRS89_HU30_0223_LID.asc to the bottom of the layer 'stack'


Now, export elevation data from GM in a source file format used by FS SDK Resample to output a terrain mesh BGL:

5.) GM Menu > Tools > Configure... > General > Export:

a.) Default Bounds > tick: All Loaded Data

b.) Snap Bounds > tick: Do Not Snap Bounds

c.) Check: ONLY the remaining check-boxes as follows:

(1) Automatically Interpolate Resampled Exports


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

a.) At 'Select Export Format' prompt, pick: "GeoTIFF" > click: [OK] button

b.) At 'Tip' prompt click: [OK] button

c.) In 'GeoTIFF Export dialog > {GeoTIFF options} tab:

File Type: tick: "Elevation (32-bit floating point) samples

Vertical Units: "FEET" <-- If not FEET, set to FEET

Resampling: "Bicubic Interpolation"


Do NOT change: Sample Spacing / Scale ('arc degrees' values are automatically filled in by Global Mapper)

Check: Always Generate Square Pixels check-box

Do NOT click: [Click Here to Calculate Spacing in Other Units...] button

Do NOT check: Export At The Fixed Scale 1: "0"


6.) d.) In 'GeoTIFF Export' dialog > {TIFF Format Options} tab:

Do Not Change: DPI Value To Save in Image (0 for None): "0"

Compression: Default (No Compression)

Check: ONLY the remaining check-boxes as follows:

Interpolate to Fill Small Gaps in Data

Generate TFW (World) File

Generate PRJ File



6
.) e.) In 'GeoTIFF Export' dialog, on {Tiling} tab:

Tick: No Tiling - Just One Export File

Do NOT check: 'Skip Existing Files (Use to Complete Cancelled Exports)'


6.) f.) In 'GeoTIFF Export' dialog, on {Export Bounds} tab:

(1) Tick: All Loaded Data

...or:

Click: [Draw a Box...] button to select desired area in workspace (or specify via the GUI in that dialog box Tab).

(2) Click: [OK] button


GM should now export a "void-filled" 32-Bit floating point elevation grid GeoTiff source file.

That GIS output file format should be compatible for use with FS SDK Resample via a *.INF file using FractionBits. :pushpin:


Save a Global Mapper "Workspace" (*.GMW) file named for your current project task GM loaded file set / configuration via:

GM Menu > File > Save Workspace As...


Next you must create a *.INF file for processing of a elevation GeoTiff source file by FS SDK Resample to output a FS terrain mesh BGL. :coffee:


For simplicity, you may wish to use Ollyau's "GeoTiff-To-INF" utility to read the Geo-referencing within the file header of the elevation GeoTiff output by GM along with accompanying *.TFW and *.PRJ files, and which will then output a basic *.INF file with computed Geo-referencing parameter values. :idea:

http://www.fsdeveloper.com/forum/resources/geotiff-to-inf.119/



NOTE: Ollyau's "GeoTiff-To-INF" utility (as programmed thus far) is only intended for use in creating a *.INF file structured for use with FS SDK Resample to output a custom photo-real aerial imagery BGL (from a aerial imagery source data GeoTiff).

However, with minimal editing in Windows NotePad (or NotePad++), a COPY of that *.INF can be modified for use in creating a *.INF file structured for use with FS SDK Resample to output a custom terrain mesh BGL (from a elevation source data GeoTiff.



Alternatively, the required Geo-referencing parameter values for a properly structured *.INF file to be used in processing of the elevation GeoTiff source file by FS SDK Resample to output a FS terrain mesh BGL, can be derived from 'Metadata' for the PNOA_MDT05_ETRS89_HU30_0223_LID.asc layer within GM's Overlay Control Center.

A detailed example of how to do the above edit with example *.INF files can be posted here ...upon request. ;)


PS: Please post a heads-up if you see any apparent errors / omissions that may have occurred while I edited this.


..More to come soon... :)


GaryGB
 
Last edited:
Hi Tony:


After the *.INF file and elevation GeoTiff source data are compiled by FS SDK Resample to output a FS terrain mesh BGL, one may wish to inspect the impact of that elevation data set on existing local terrain in FS at run time.

I suggest doing this initially without loading (2) FS default scenery BGLs in Vigo Airport (IATA: VGO, ICAO: LEVX) area:

The name of (2) FS default scenery BGLs for Vigo Airport is determined by loading FSX' default local terrain mesh BGL.


NOTE: Local FS default scenery area File / Folder 'path' info ...can be derived by a review of this SDK document:

https://www.prepar3d.com/SDKv4/sdk/world/terrain/terrain_overview.html#Base File Information


1.) FSX SDK TMFViewer > click: File > Open > [FSX install path]\Scenery\0502\scenery\dem0502.bgl (default terrain mesh)

2.) TMFViewer > View > LOD Grid: 13 (terrain grid 'quad' size)

3.) TMFViewer > View > click: QMID Grid: 11 (terrain grid 'quad' size)

4.) TMFViewer > Jump > Lat Long... coordinates: LAT: 42.229168, LON: -8.627500 > click: [OK] button

'Jump' to the local coordinates, 'Zoom' in/out with +/- keys, then move the mouse cursor over areas in question.

NOTE: On the Right side of the bottom status bar, "Dir # 0502 File # 4516" shows FS local scenery Folder \ File info


5.) In Windows Explorer (aka: "Computer") > Browse to: [FSX install path]\Scenery\0502\scenery\ sub-folder

a.) Select: CVX4516.bgl (FS default local vector objects)

(1) Right-click: CVX4516.bgl > click: Send to > click: Compressed (zipped) folder > click: [OK] button

b.) Select: APX45160.bgl (FS default local airport facilities data and objects)

(1) Right-click: CVX45160.bgl > click: Send to > click: Compressed (zipped) folder > click: [OK] button


NOTE: New zipped folders with the same file name as the original BGL are created within the same sub-folder location.


After *.ZIP files are created, delete (ONLY) the original *.BGLs used to create *.ZIP archives with copies of the BGLs.


Now one can inspect the impact of that elevation data set on existing local terrain in FS at run time:


6.) In Windows Explorer (aka: "Computer") > Browse / Select: [FSX install path]\Addon Scenery\ sub-folder

a.) Right-click: \Addon Scenery\ sub-folder > click: New > click: Folder > Type: ex: Vigo_LEVX > click: [OK] button

b.) Right-click: \Addon Scenery\Vigo_LEVX\ sub-folder > click: New > click: Folder > Type: Scenery > click: [OK] button


7.) In Windows Explorer > Copy / Paste the new FS terrain mesh BGL just compiled for Vigo into:

[FSX install path]\Addon Scenery\Vigo_LEVX\Scenery\ sub-folder


8.) Launch: FSX or P3D main GUI

a.) In FS Scenery Library GUI > click: [Add Area] button > ('Select Scenery Directory' dialog opens)

(1) In 'Select Scenery Directory' dialog > Browse to:

[FSX install path]\Addon Scenery\Vigo_LEVX\Scenery\ sub-folder


(2) Click: (only once) on white background area of Select Scenery Directory' dialog box

(3) Click: [OK] button


9.) Back in FSX or P3D main GUI > start: a Flight at Vigo airport

10.) Inspect the new FS terrain mesh BGL around Vigo to see if terrain anomalies display within its local coverage area.


Next one may create Exclude Polygons for FS default CVX vector Airport Boundary (aka "Background") Flatten / MaskClassMap / Exclude Autogen objects and/or other local area terrain land class objects ...as BGLs.


NOTE: CVX vector Exclude Polygons and replacement CVX vector terrain objects compiled to BGLs via SDK SHP2VEC are distinct from Exclusion Rectangles for FS default airport / other local area objects compiled via SDK BGLComp.


IMHO, 'Excludes' are done more precisely in SBuilderX by 'Appending' local default FS CVX vector objects by use of Patrick Germain's CvxExtractor to Export ESRI *.SHP files of derived source data for default FS CVX vector objects in:

[FSX install path]\Scenery\0502\scenery\CVX4516.bgl (FS default local vector objects)


https://www.fsdeveloper.com/forum/threads/cvxextractor-exporting-vector-data.432918/


CAVEAT: After "Exclude" BGLs are created / loaded, restore FS default BGL files from these Compressed (zipped) folders:

[FSX install path]\Scenery\0502\scenery\CVX4516.ZIP (FS default local vector objects)

[FSX install path]\Scenery\0502\scenery\APX45160.ZIP (FS default local airport facilities data and objects)


FYI: You may wish to follow the steps listed in MS' Windows online documentation for this procedure:

Microsoft Windows Documentation said:
https://support.microsoft.com/en-us/help/14200/windows-compress-uncompress-zip-files

"Locate the zipped folder that you want to unzip (extract) files or folders from.

Do one of the following:

To unzip a single file or folder, open the zipped folder, then drag the file or folder from the zipped folder to a new location.

To unzip all the contents of the zipped folder, press and hold (or right-click) the folder, select Extract All, and then follow the instructions."

NOTE: GM may also be used to Export a 'non-warped' Raster image of PNOA_MA_OF_ETRS89_HU29_h50_0223.ecw

One would first re-project into an (EPSG:3857) GIS 'non-warped' format before Export into a "Raster Image Format" GeoTIFF. :pushpin:

A 'non-warped' *.JPG or LZW-compressed GeoTIFF "tiled" export may be used as background image in ADE or 3DSMAX


BTW: In SBuilderX, one need NOT "Import" any IGN Background imagery via Add Map > From Disk, as the ESRI ArcGIS World Imagery tile server appears to use the same source data as the IGN imagery, and can be displayed via:

1.) SBuilderX Menu > Edit >Tile Servers > ArcGisImagery > check: Use ArcGisImagery ? check-box > click: [OK]

2.) SBuilderX Menu > View > Show Background ...F1

One may edit / replace / align 'Appended' FS default CVX vector objects over a IGN / ArcGisImagery Background Map.


A detailed example of how to do the latter procedures cited above using SBuilderX can be posted ...upon request. ;)


PS: Please post a heads-up if you see any apparent errors / omissions that may have occurred while I edited this. :)

GaryGB
 
Last edited:
Oh wow, thanks a lot for the first part. Looking forward to that second part. I haven't been able to try it out due to some personal stuff, but I am going to do so soon.
 
Last edited:
Thanks a lot for the huge explanation. I haven't had time to sit on the sim and try this. I will give it a go during the weekend and will let you know how it goes. Again thanks a lot. I will also have to learn how to use SBuilderX appropriately and do what you mentioned if you have any guide or video to follow I will appreciate it. But thanks for all :)
 
https://www.fsdeveloper.com/forum/threads/having-troubles-with-airport-mesh.445990/post-829409

Thanks a lot for the huge explanation. I haven't had time to sit on the sim and try this. I will give it a go during the weekend and will let you know how it goes. Again thanks a lot. I will also have to learn how to use SBuilderX appropriately and do what you mentioned if you have any guide or video to follow I will appreciate it. But thanks for all :)

Hi Tony:

Indeed, the numerous GM configuration steps are initially tedious, but they may only need to be set once per project task, and IIRC, are otherwise retained as a default in the AppData for GM, thus being 'ready-to-use' the next time one loads GM.

[EDITED]

However, it is best to always save a GM "work-space" file (*.GMW) for each project work session, to restore configuration settings and re-load source files from disk when resuming particular tasks in GM (...as now mentioned in context above.) :pushpin:


It would probably be best to post the SBuilderX-specific and ADE-specific work-flow info within those particular sub-forums (with a citation by URL back to this thread as a related topic, to ensure we generate a "cross-link" for the benefit of readers with a enduring interest in learning a more comprehensive approach to making FS scenery). ;)

I'll post example work-flow info related to preparing GM exports for subsequent use by SBuilderX and ADE within those same threads.

[END_EDIT]


Incidental to that, I'll also explain how to use Patrick Germain's CvxExtractor to export ESRI *.SHP files that can be utilized in other aspects of scenery object exclusion / modification / production.

https://www.fsdeveloper.com/forum/threads/cvxextractor-exporting-vector-data.432918/


Some pertinent links regarding CvxExtractor:

https://www.google.com/search?ei=54V2XeGeA8S6sQWRhbWwBw&q=site:www.fsdeveloper.com+GaryGB+SBuilderX+CvxExtractor+SHP+GUID&oq=site:www.fsdeveloper.com+GaryGB+SBuilderX+CvxExtractor+SHP+GUID&gs_l=psy-ab.3...4498312.4550077..4551192...0.0..0.139.2656.3j22......1....2j1..gws-wiz.I3HBO3WItXk&ved=0ahUKEwihrsOlnMTkAhVEXawKHZFCDXYQ4dUDCAs&uact=5


If I don't get any time free tomorrow, I'll probably post some more on these related aspects of the "work-flow" on Monday. :)

GaryGB
 
Last edited:
Hi Tony:

Indeed, the numerous configuration steps are initially tedious, but they may only need to be set once per project task, and IIRC, are otherwise retained as a default in the AppData for GM, thus being 'ready-to-use' the nest time one laods GM.

However, it is best to always save a GM "work-space" file (*.GMW for each project work session to restore configuration settings and re-load source files from disk when resuming particular tasks in GM.

I'll have to edit that info into one of my posts above when I get back to my main FS computer. :pushpin:


I'll post further example work-flow info related to preparing GM exports for subsequent use by SBuilderX and ADE within this same thread.

Incidental to that, I'll also explain how to use Patrick Germain's CvxExtractor to export ESRI *.SHP files that can be utilized in other aspects of scenery object exclusion / modification / production.


Then, it would probably be best to post the SBuilderX-specific and ADE-specific work-flow info within those sub-forums (with a citation by URL back to this thread as a related topic to ensure we generate a "cross-link" for the benefit of readers with a enduring interest in learning a more comprehensive approach to making FS scenery). ;)

If I don't get any time free tomorrow, I'll probably post some more on these related aspects of the "work-flow" on Monday or Tuesday. :)

GaryGB
Oh, don't rush it. Whenever you can. Hahaha I am reading all this and taking notes, but I am busy with my capstone project to graduate of my design degree but I am very grateful for your help and breakdown as there isn't much of documentation about it or is very hard to find as everything is widespread and as well you explain everything in a very cohesive manner :)
 
Hi Tony:

Please note the edits made to my latter posts above. ;)


I must attend to other matters today (Monday) in preparation for a week of travel starting as early as tomorrow (Tuesday). :cool:

I anticipate that I may not have an opportunity to post additional information until sometime early next week.


Good Luck with your "capstone project"; I'll check on posted progress / questions for your Vigo project here ...as available time permits. :)

GaryGB
 
I did an airport a few years ago where I was having somewhat similar issues. I also used 5M elevation data with QGIS. My approach was a little bit different. I capped, or sliced the terrain via flatten at an altitude I thought could be a good "start", and essentially made it look like a top hat. I then modeled the mesh manually using ADEx, and a LOT of triangles.

The process was not as neat as editing the GIS data directly, but it did the job.


Notice on the video how there is a slight delay on the mesh generation......it can work the processor hard! Gary's method should be smoother than this.

David
 
Top