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

Qgis users? Qgis saving my Float 32 and/or int 16 files as 8 Bit

Gary,

I went to USGS TNM Download and clicked Elevation Products, then clicked 1arc-second and 1/3 arc-second and 1/9 arc-second. then clicked search products. I downloaded the two GeoTiIFFs, "USGS_1_n36w083_20220512.tif" and "USGS_13_n36w083_20220512.tif" Then imported them to Qgis. I didnt do anything to them in Qgis. Just exported them as GeoTiffs, retaining the original file names. Next I made the Infs from each of the files, "USGS_1_n36w083_20220512.tif" and "USGS_13_n36w083_20220512.tif", using GeoTiffToInf.
I combined the "source" section of each of the infs into a single multi-source inf, with the appropriate header and additions you showed above. I named the Inf "2NC0_USGS_1+13.inf". I then resampled the Inf, "2NC0_USGS_1+13.inf", and created 2NC0_USGS_1+13.bgl. Added this bgl to 2NC0 Terrain/Scenery folder with the cvx_2NC0_ADEX_GGB.bgl you sent me.

Im getting some really strange looking landscape with plateaus and floating runways! Must really have something messed up now!!
 

Attachments

  • MORE UH OH.jpg
    MORE UH OH.jpg
    1.3 MB · Views: 93
Hi Scott:

Ah... Monument Valley ! :laughing:

I did something similar years ago when I was testing various settings with SDK Resample to make terrain mesh. ;)


Be sure to clear out all older BGLs from your active 2NC0\Scenery sub-folder for each test. :pushpin:

Keep your 2NC0 Area layer at the top of the FSX Scenery Library stack of layers.


Be aware that when we load the USGS DEMs into a GIS app, they initially are GIS projected as stated in the pertinent USGS Metadata:

https://thor-f5.er.usgs.gov/ngtoc/m...C_Phase5_2018_A18/USGS_1_n36w083_20220512.xml

"These data are distributed in geographic coordinates in units of decimal degrees, and in conformance with the North American Datum of 1983 (NAD 83).

All elevation values are in meters and, over the conterminous United States, are referenced to the North American Vertical Datum of 1988 (NAVD 88). The vertical reference will vary in other areas.

Seamless 3DEP data are available nationally (except for Alaska) at resolutions of 1 arc-second (approximately 30 meters) and 1/3 arc-second (approximately 10 meters)."


Thus, in our GIS app we must re-project DEM data from its native format to EPSG:4326 ...for submission to SDK Resample.


When I output DEM data from Global Mapper as GeoTiff, the GIS type is referred to as an Elevation Grid (Gridded Elevation Values).

I assume QGIS may have something similar within its syntax and available GIS export types. :scratchch


We must be careful to distinguish an Elevation Grid from a color HillShade image render of terrain elevation exported as a GeoTiff.


FYI: Historically, forum participation is minimal until mid- to late- December, so I do not know if anyone else may help with QGIS.

Perhaps Chris (aka "crushnik") might share the QGIS method for his terrain mesh set (which is freely available to download for CONUS):

https://untothebreach.net/wildweasels/


This is the latest Multi-source INF I created for the (2) DEM files cited above, re-projected to EPSG:4326 / output as Elevation Grid GeoTiffs:

Code:
[Source]
Type = MultiSource
NumberOfSources = 2

[Source1]
Type=GEOTIFF
Layer=Elevation
SourceDir="."
SourceFile="USGS_13_n36w083_20220512_EPSG_4326.tif"
MinValidValue=0
NullCellValue=-32767
ulxMap=-83.0005092602967
ulyMap=36.0005092591024
xDim=9.25925926912144E-05
yDim=9.25925926912137E-05
PixelIsPoint=0

[Source2]
Type=GEOTIFF
Layer=Elevation
SourceDir="."
SourceFile="USGS_1_n36w083_20220512_EPSG_4326.tif"
MinValidValue=0
NullCellValue=-32767
ulxMap=-83.0015277782934
ulyMap=36.0015277770992
xDim=0.000277777777784061
yDim=0.000277777777784061
PixelIsPoint=0

[Destination]
DestDir="."
DestBaseFileName="2NC0_USGS_1+13_n36w083_20220512"
LOD=Auto
FractionBits=3
CompressionQuality=100

You may note that I added a "_EPSG_4326.tif" suffix to the end of each filename for the re-projected Elevation Grid GeoTiffs.

GaryGB
 
Last edited:
Scott,
Apart from the northern half of Alaska I have the entire United States in 1/3 arc-second. I could explain my process, which is pretty easy, if you want or I could just tell you where to download my scenery and you wouldn't have to do as much work.

Chris
 
Hi Chris:

As an experienced QGIS user, would you be so kind as to share your knowledge of the procedure to do some basic GIS tasks ? :teacher:

AFAIK, the FSDeveloper Community needs a GIS tool that is free (such as QGIS ;) ? ) to perform:

* GIS re-projection / conversion of various source data sets in a mix of GIS formats and projections, into:

1.) EPSG:4326

2.) EPSG:3857

3.) Elevation Grid (aka "Gridded Elevation") DEM / DTM output to GeoTiff files for terrain mesh

4.) Imagery output to GeoTiff files

5.) Vector data output to ESRI Shape (aka "*.SHP") files


Since your own project successfully worked with all the above tasks to achieve your (initial ?) goals, I hope you may help others too.

I would like to see a reference here at FSDeveloper which contains a very basic guide to using QGIS to do the above tasks.

If you would be so kind as to contribute to such an effort, I would like to be able to link to such a guide in the future to help folks.


Are you aware of a very simple step-by-step process using QGIS for the above tasks of GIS re-projection / DEM / DTM / SHP output ?

If so, would you please post it here for Scott ? :oops:


I am particularly concerned that someone with your experience confirm and explain QGIS' terminology / work-flow to do the above.

Assuming there are now 'consistent' GUI navigation sequences in specific freely available "main-stream" current QGIS versions, would you please provide a very basic step-by-step menu walk-through in such a recent QGIS version, to do the above very basic tasks ?


As I am limited in my available time and energy, and already have an established work-flow with Global Mapper, I don't "do" QGIS.

But, like expensive tools such as 3DSMAX etc, very few here are ready / willing / able to consider purchase of such software.

Although Arno and Dick have kindly offered help in the past using the command line versions of GDAL etc., their time and energy is also limited, thus, folks here that would like to perform basic GIS tasks using QGIS / GDAL as 'free' GIS apps ...now get little / no help.

On behalf of others at FSDeveloper, I would be grateful for any help you might be willing to offer to those trying to use QGIS. :)


PS: You may find it interesting to follow this thread as time permits, as I suspect you might also wish to add "tiles" of 1-Meter DEM or TINs to certain special interest areas of your own project for an enhanced FS2Kx user experience via alphanumeric name controlled, priority loading to ensure synchronous display with terrain mesh having larger coverage extents in the headers of BGLs.

As "normal" altitude flight AGL does not render higher LODs, it is impractical to use 1-Meter terrain mesh in the entire FS world.

But, certain areas of interest like 2NC0 at low AGL Altitudes merit special very high detail enhancement in quads contiguous to such airports. :idea:

GaryGB
 
Last edited:
I had written a pretty detailed step-by-step instruction on how I automated the whole process, but I accidentally closed the window and lost the whole post.
Since I ran out of time I will quickly post how to use QGIS to reproject USGS 1/3 arc-second data and return later and share my automated process.

1: Import data
a: If you already have USGS data, open the TIF in QGIS by Selecting Layer>Add Layer>Add Raster Layer or simply hit Ctrl-Shift-R. Click OK when you get a dialogue box about projections.
2: Reproject to WGS84 and export.
a: In the lower-right of my screen it says EPSG:4269. Flight simulators need WGS 84, so right-click your data in the "Layer" screen to the left of your pretty map and select Export>Save As
b: Chose your File Name and change the data projection by clicking on the CRS under where you changed the name. Select "EPSG:4326 - WGS 84" and click "OK" to convert.

You now have a reprojected GeoTiff file that you can use to generate an INF file that the flight simulator's compiler can use to generate an elevation BGL file.

Let me know if this helps, or if you are looking for something else. I will post my process for converting vector objects, like streets/bridges and waterbodies shortly.
It's a little bit of a learning curve up front, but it's pretty easy once you've done it a couple times.
 
Last edited:
Many thanks, Chris. :)

Looks like this info is off to a great start, and will be very helpful to existing, and future 'would-be' QGIS users. :coffee:


Would I be correct that you refer to a specific freely available "main-stream" current QGIS version as the basis for your GUI tutorial ?

If so, which one ...and where might one download it ? :scratchch

GaryGB
 
Last edited:
Hello Chris and Gary,

Thanks for all the input! Still trying to process all the information offered by you both in the last couple of threads! :oops:

BTW...I have Qgis ver 3.28. I saw the GDAL download site. Should I download this and what is it used for?

I have started from the beginning with the downloaded USGS data file, USGS_13_n36w083_20220512.tif (1/3 arc second)

From Chris's instructions...
1: Import data
a: If you already have USGS data, open the TIF in QGIS by Selecting Layer>Add Layer>Add Raster Layer or simply hit Ctrl-Shift-R. Click OK when you get a dialogue box about projections.
I did this, and immediately hit upon question. Unless I misunderstand "dialogue box about projections", I did have a dialogue box. titled; "Data Source Manager | Raster"
This is how I addressed that box...
Source Type,
"File" was already chk'd.
Source,
I entered the file location/name.
Options,
Left NUM_THREADS blank.
Left GEOTIFF_KEYS_FLAVOR set as <default>.
Left GEOREF_SOURCES blank.
Left SPARSE_OK as <default>

Clicked "Add" and then closed. Layer appeared in Qgis as well as a "pretty" greyscale picture!:)

2: Reproject to WGS84 and export.
a: In the lower-right of my screen it says EPSG:4269.
As did mine. I clicked on that little box and a "project properties--CRS" window opened. I selected WGS 84 <space> EPSG:4326 and clicked ok. WIndow closed and little box in lower left now reads EPSG;4326

Flight simulators need WGS 84, so right-click your data in the "Layer" screen to the left of your pretty map and select Export>Save As
b: Chose your File Name and change the data projection by clicking on the CRS under where you changed the name. Select "EPSG:4326 - WGS 84" and click "OK" to convert.
Right click /save as opens the "Save Raster Layer as..." window.
Output mode;
Left Raw data checked (I had read previously to change this to Rendered image)
Format;
GeoTIFF
File name;
USGS_13_n36w083_20220512_export.tif

Layer name ;
Left blank
CRS;
Already reads "EPSG;4326 - WGS84". Left alone.
Extent (current layer);
Did not change anything.
Resolution (current layer);
Left as Horizontal. No changes (Read previously to change this to columns)
Create Options (was checked);
Left Profile as default. (ZRead as well this should be changed to no compression)
Clicked okay


Kinda detailed here but wanted you'all to see, as best I could illustrate, what i had done up to this point.
 
You must be looking at something different than I am... You could just download whatever you wanted from my site in the signature and be done with it. Or you could avoid QGIS altogether and do it all with command prompts.

1: Download the data from USGS. You could do several tiles at once this way if you wanted.
2: Create a folder named C:\Input and copy your downloaded files to it.
3: Create a folder C:\Output.
4: Open up OSGeo4W Shell (create a shortcut for it if you don't have one)
5. Copy and paste the following into the screen and hit enter
cmd /v:on set dems=C:\Input set output=C:\Output for %f in ("%dems%\USGS_13_*.tif") do ( set filename=%~nf set shortname=!filename:~8,7! gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -t_srs "+proj=latlong +datum=WGS84" -r cubic %f "%output%\!shortname!.tif" )
6: Open C:\Output - these have been reprojected and are ready for an INF file, which you need to download GeoTiffToInf from this website.
7: Open GeoTiffToInf and point it to your Output folder and generate an INF file for each of your files.
8: Edit the INF file.
[Source] Type=GeoTIFF Layer=Elevation NullValue=-999999 SourceDir="." SourceFile="NxxWxxx.tif" PixelIsPoint=0 xxx [Destination] DestDir="." DestBaseFileName="NxxWxxx" FractionBits=3 LOD=4,12
This is what I typically use. NxxWxxx will be the name of your tif file, and the xxx is where you put this stuff, which you'll have from the INF file that GeoTiffToInf generated.
ulxMap=-83.0005092602967 ulyMap=36.0005092591024 xDim=9.25925926912144E-05 yDim=9.25925926912137E-05
Sometimes it gets weird when you are making scenery on a border or ocean and for that you'll need to generate a GDALINFO file to see what your NullValue should be so you don't have any 10,000-foot holes in your scenery but we can address that later.
9: Drag your INF files into resample.exe (found in you SDK files) and it you have scenery.
 
Last edited:
Hi Chris,

K, I am trying the command prompt. I copied and pasted the text and hit enter. Cmd window looked like it ran but nothing in C:\Output.

I do see something at the end...

" 'gdalwarp' is not recognized as an internal or external command, operable program or batch file. "
 

Attachments

  • cmd window.jpg
    cmd window.jpg
    352.6 KB · Views: 70
BTW...downloading the Flyover Country files now!
Maybe you're missing a component of QGIS that I have. OSGeo4W Shell is what you need, and it's always installed when I download QGIS. It is included in the latest version of QGIS and in the meantime I hope that the Flyover Country works for you.
 
Last edited:
Hello:

Perhaps this info may prove useful ?

https://www.osgeo.org/projects/osgeo4w/

https://developers.planet.com/docs/planetschool/gdal-qgis-installation-setup/

"

Windows Users​

If you're running Windows, use the OSGEO4W Installer to download & install a variety of free & open source geospatial tools, including GDAL & QGIS.

Visit http://trac.osgeo.org/osgeo4w, and follow the Quick Start for OSGeo4W Users steps:

osgeo4w.png

Download & run the appropriate network installer for your system

During the setup process, make sure to select both the "GDAL" package and "QGIS" to be installed.

TIP: if you run into issues after the initial run of the installer, re-run the OSGEO4W installer & repeat steps 2-5 above. It's possible that some dependencies will not be installed on the first run.

Once installation is complete, you'll use the OSGeo4W Shell to access command line utilities like GDAL. This shell is automatically installed after completing the above."

GaryGB
 
Last edited:
Hi Scott:

Normally I would say, yes, start with the prior install removed via Control Panel > Programs and Features > Uninstall.

But the thread I linked to above suggests occasional incomplete installs are not uncommon, and the 'fix' is to re-install.

https://www.fsdeveloper.com/forum/t...d-or-int-16-files-as-8-bit.456234/post-909651


I have not yet had time to install and track behavior of OSGEO4W and QGIS, so Chris likely has a more experienced answer than I do.


However, one might infer that OSGEO4W and QGIS installers maintain discrete self-contained folder chains from what this thread discusses:

https://gis.stackexchange.com/quest...gis-from-previously-downloaded-osgeo-packages


IIUC, re-naming the existing folder and allowing a installer to run again (to create a new folder chain) may allow comparing both installs.

GaryGB
 
Last edited:
Gary,
SHould I uninstall the Qgis that i currently have?
I doubt that whatever we do for flight simulation requires the latest version, but it won't hurt anything. Search your computer for OSGeo4W Shell. If you have that, open it and paste the code from my post above. I incorrectly told you to open a command prompt, but since I haven't done this process in a year or so I forgot exactly how I made scenery. Did you have any luck with my scenery? If you haven't already, you need to adjust the terrain resolution in your flight simulator to a higher setting or else you won't see a difference. I am wanting to say that stock P3D/FSX for continental U.S. is 38 m and my scenery is 10m so you'd want to go with something lower than 10 meters per pixel.
 
The FAQs on OSGeo4W say that to uninstall, just delete folder.
Does that mean I can just move the folder to another drive? OSGeo4W installs default to C:\ which i do not want (Space)
 
Hi Scott:

Most installers search for prior installs under their folder name and/or the file name of the main executable, while also checking the Windows Registry for strings used by an existing install.

In rare cases applications are true free-standing folder chains that do not write into the Windows Registry and/or Programs menu.

Based on what you cited from the OSGeo4W FAQ, OSGeo4W itself may be such an application.

However, IIUC, OSGeo4W is a "shell" (aka a 'front-end') for other GIS applications that may write to the Windows Registry and Programs Menu.

So I believe it would be prudent to do an unistall to ensure that any group of GIS applications that are subsequently (re-)installed can find each others code when / where it needs it.

If there are files that you wish to keep from your existing install, I recommend adding them into a ZIP file and storing that on a separate drive letter location.

Then I would uninstall the existing application, and immediately reinstall it as described in the thread I linked to above.

GaryGB
 
Last edited:
The FAQs on OSGeo4W say that to uninstall, just delete folder.
Does that mean I can just move the folder to another drive? OSGeo4W installs default to C:\ which i do not want (Space)
I install most of my files in another drive as well for the same reason and I got to pick the drive when I installed QGIS. If it is on the wrong drive you should be able to just uninstall and reinstall QGIS and change the install destination folder.
 
Back
Top