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

FSXA Questions About QGIS

Messages
1,235
Hi,

I was wondering if anyone here is familiar with QGIS and knows how to use it. Does it have any limitations and how does it compare to Global Mapper? I've read over the manual about using QGIS but there are a lot of things that it does not cover, or at least cannot find in the manual. It's too vague and does not cover the things I'm trying to do and want to know about. I've googled it and sometimes get more than I do from the manual, but even that does not cover the things I want to know. I've downloaded DEM around the KBHM airport but it's resolution is only 1 arc degree. It looks fairly good but still did not raise the terrain that runs up and down East Lake Blvd. It's still flat. I've found a very good video that explains how to do this using QGIS. The problem I'm having in QGIS is exporting google images. The first thing I did is load the google satellite. I double click on google satellite in the Browser panel at the left and a google map shows up. I first set my projection to WGS84 with ID authority EPSG:4326 and zoom in to my airport. I click on the Zoom In icon at the top toolbar and draw my extents. Then I right click on google satellite in the Layers panel at the left, select Export, and click Save As. A Save Raster Layer As dialog box opens. Now this is where I'm having problems, and the manual mentions nothing about how to do this, at least I've haven't found anything about it. The Output Mode gives me 2 options, Raw Data or Rendered Image. It's set to Raw Data. I've tried the other selection but it made no difference. The Format is set to GeoTiff. I uncheck Create VRT and enter the file name for my image. Next to CRS I select WSG84 EPSG:4326. Below is the Extent options with severl buttons. I clicked on the button Map Canvas Extent. Now this is where I'm lost, which is the Resolution. I have a choice to select horizontal and vertical resolution or select by columns and rows. When I click on the Map Canvas Extent button, the resolution is 3.6 for the horizontal and 3.59941 for the vertical. I have no idea where the 3.6 and the 3.59941 us calculated from. Is it pixels or what? I've search everywhere and nothing is mentioned as to what these numbers are or what they mean. In the Colums and Rows, the numbers are 0. But this generates an error message when I click on Okay:

Cannot write raster. Error code: data source creation
Cannot create new dataset C:\Users\Admin\Desktop\KBHM Project\Birmingham Area\KBHM_Map.tif:
Attempt to create 0x0 dataset is illegal, sizes must be larger than zero.

I assume the 0x0 dataset is referring to the columns and Rows being at 0. Why does it go to zero when I click on the Map Canvas Extent button? What are the units for the resolution and for the columns and Rows, and how does one determine that? It's this Resolution and the Columns and Rows that I'm having problems understanding. Another thing I've noticed is that the resolution of the google satellite view in QGIS is nowhere is sharp as google earth and even SbuilderX.

Ken.
 
Last edited:
Hi Ken:

See my reply here:

https://www.fsdeveloper.com/forum/threads/problem-with-terrain-elevation.460137/post-935370


There is much higher resolution elevation and imagery data freely available for the USA that can be used for FS2Kx.


Other GIS applications and FS utilities such as SBuilderX may prove more practical to use for making terrain mesh and imagery.


FS2Kx is useful for learning / testing / prototyping, but MSFS is closer to IRL 'out-of-the-box' than FS2Kx.

Why exhaust oneself grappling with inevitable complexities of terrain development for FS2Kx, if MSFS is largely "ready-to-use" ?


If we wish to precisely modify MSFS terrain, we can still do so with the SDK, but most MSFS terrain is already very close to IRL.

GaryGB
 
Last edited:
Hi.

I'm a little familiar with QGIS, but I primarily work with ArcGIS Pro (Personal Use License). The process is similar in both programs.
Do you want to create an orthophoto? Then use QGIS; it gives you very fast results. Regarding elevation data, I'll have to figure out how it works in QGIS first.

Export Orthophotos in QGis as GeoTiff

1. Load a WMS service or your Google aerial image
wms_qgis.jpg




WGS84 (EPSG:4326) aerial image loaded in the main window
wgs84_ortho_qgis.jpg




2. Zoom into your image section
zoom_wgs84_qgis_dortmund_phoenixsee.jpg




3. Export your image section as GeoTiff
export_geotiff_qgis.jpg




Export Settings
1. Generate VRT = off
2. Select path and file name

Next, you need to tell QGIS what, or rather, which area of the aerial image should be exported. Here, you use "Map extent":
export_geotiff_ausschnitt_qgis.jpg



Resolution
Here you specify the resolution of the aerial image to be exported. The WMS service in my state of North Rhine-Westphalia provides 10-centimeter aerial images free of charge (open data).
So I set the export settings to 10 centimeters.

1. Under KBS, change from EPSG:4326 to EPSG:25832
2. Under "Resolution," set 0.10 x 0.10.
qgis_export_einstellungen_aufloesung_kbs.jpg



Afterwards, and this is important, set the KBS back to EPSG:4326 (from EPSG:25832 to EPSG:4326)!

Finally, the default settings and the blank value are entered:
1. TFW=True
2. Blank value=0.0
qgis_export_einstellungen_leerwert_voreinstellungen.jpg


The blank value 0.0 is important! If you later want to incorporate a blend mask into the GeoTiff file, the compiler knows which color value to mask (0 = black).
The TFW file is important! This file contains the spatial reference, i.e., where your aerial photograph is located in the 4326 CRS. If you save the GeoTiff after editing, for example, in Photoshop, you will lose the CRS.
The TFW file makes it very easy to reassign the CRS to the GeoTiff file using QGIS ;)

Export of GeoTiff
Once you've configured everything, click "OK"; you can ignore any warning message.
After the process, there should be two files in the folder: your GeoTiff file and the TFW file.

That's all. Have fun, and please let me know how you got on :)


Assign CRS/Projection in Qgis
qgis_projektion_kbs_zuweisen.jpg
 

Attachments

  • export_erfolgreich.jpg
    export_erfolgreich.jpg
    84.6 KB · Views: 86
Hi Christian,

Thanks so much for posting. The instructions you've posted is basically what I've been doing but I'm still having the same problems. Every time I click on the Map Canvas Extent button, the columns and rows would go to zero and when I click Okay, I get this message:

Cannot write raster. Errow code: data source creation
Cannot create new dataset C:\Users\Admin\Desktop\KBHM Project\QGIS Files\KBHM.tiff:
Attempt to create 0x0 dataset is illegal, sizes must be larger than zero.

I assume that this is because the columns and rows are zero.

You've mentioned that the default settings and the blank value are entered:

1. TFW=True
2. Blank value=0.0

That doesn't happen to me, or nothing shows in those boxes. I don't know if it's because I don't have my QGIS setup properly or not. One thing I don't understand is why do I change the CRS from EPSG:4326 to EPSG: 25832 to enter the 0.1 for the resolution and then setting the CRS back to EPSG:4326?

I wanted to mention that when I set my CRS to EPGS:4326, it automatically enters the resolutions of 3.6 for the horizontal and 3.59941 for the vertical. But for the columns and rows, they are both zero. So I don't know why they go to zero. Whatever the case, I don't understand why I get the error message and nothing is exported.


Ken.
 
Last edited:
Clearly, if the columns and rows remain empty, nothing will be exported. You can try to work with EPSG:3857 (WGS84 - Pseudo Mercator), this KBS also works in MSFS/MSFS24.
epsg_3857_pseudo_mercator.jpg



You've mentioned that the default settings and the blank value are entered:

1. TFW=True
2. Blank value=0.0

That doesn't happen to me, or nothing shows in those boxes.
There's a green plus sign to add values ;)

Edit: I just see that the aerial image is supposed to be for FSX? EPSG:3857 obviously doesn't work there; only EPSG:4326 works. Sorry.
 
Clearly, if the columns and rows remain empty, nothing will be exported.

Yes, you're correct. when CRS WSG84 EPSG:4326 is selected, the columns and rows go to zero, and it will not export. They must have a value, but I don't know what units they represent or what they mean. It's supposed to export the WSG84 EPSG:4326 projection.

There's a green plus sign to add values

Yes, I've noticed that but how do I know what values to assign? Also, what was the reason for switching to EPSG:25832 and then back to EPSG:4326?


Ken.
 
Switching from 4326 to 25832 and back to 4326 serves solely to enter the resolution in meters (0.10 x 0.10). Once the resolution is set below 25832 and you switch back to 4326, you'll see that 4326 has a different unit of measurement:


After changing back to 4326, click on "Map Section Extent" again and the rows and columns should then also receive the corresponding value.
 
Hi,

I use QGIS all the time to prepare my GIS data (together with the GDAL and OGR command line tools). It is really a great tool.

When you select EPSG 4326 you need to enter the resolution in degrees, as the unit depends on the coordinate system that you select. But you can also enter the width and height in pixels if you have a target size for it. How do you intend to use your exported GeoTIFF? If you want to procress it with resample for example you better stick to the resolution of the LOD you want to resample at. But if you want to use it as a background image in e.g. ADE then the exact resolution matters a bit less.
 
Hi Christian,

Thanks for posting the video. The video explained all the steps and I got it to export. But the problem is that the image is compressed, from left to right:

KBHM.jpg



I don't think it's supposed to look like this. Whenever I use SbuilderX for images and resampling using the EPSG:4326 in the INF, it has never looked compressed like this.

Ken.
 
Last edited:
Hi,

When you select EPSG 4326 you need to enter the resolution in degrees, as the unit depends on the coordinate system that you select.

Can you elaborate? Exactly what unit of degrees are you referring to, coordinates, angular, or radian degrees? How do I determine the number of degrees resolution I need to enter? I don't understand how degrees is related to resolution.


How do you intend to use your exported GeoTIFF?

For resampling and placing them in flight simulator.


If you want procress it with resample for example you better stick to the resolution of the LOD you want to resample at.

Can you elaborate? How do I determine the LOD, the pixel size, and the resolution in degrees in QGIS?


Ken.
 
Last edited:
Hi Christian,

Thanks for posting the video. The video explained all the steps and I got it to export. But the problem is that the image is compressed, from left to right:
The quality if the attached image is not that good, so it is hard to see what you mean with compression. I mainly see that the image is composed of segments that have been taken at different dates so that you see color differences. Do you see it like that in QGIS as well when you view the images?
Can you elaborate? Exactly what unit of degrees are you referring to, coordinates or angular degrees? How do I determine the number of degrees resolution I need to enter? I don't understand how degrees is related to resolution.
When you make a WGS84 (EPSG 4326) GeoTIFF the image will have extends over latitude and longitude as degrees. Say it covers from N52 to N52.1 and from E5 to E5.1. Then it has an extend of 0.1 degrees in both directions. If the image is 1000x1000 pixels, you would have a resolution of 0.00001 degrees per pixel. That's the number you enter in QGIS for the resolution (the actual numbers I use in this example are just made up of course).
Can you elaborate? How do I determine the LOD, the pixel size, and the resolution in degrees in QGIS?
The terrain SDK omes with a table of QMID and LOD values (see below). The actual values in the table are a bit rounded, so it is usually better to calculate them yourself, but let's say you want to compile your image at LOD16 (which is around 0.59 meter resolution), the table than lists the size in degrees of that LOD tile and also the pixel resolution. So if you make sure your resolution if your image is exactly the same, resample will not have to resize the image any more and that is better for the quality.

1756619842813.png
 
The quality if the attached image is not that good, so it is hard to see what you mean with compression.

I may have used the wrong word. I didn't mean it in the since of quality of the image. I meant it in the since of the size. In other words, the proportion is squashed, or squeezed in the left/right direction, as though you took an image 560x560 in size and compress it to a 560x320 size.

I mainly see that the image is composed of segments that have been taken at different dates so that you see color differences. Do you see it like that in QGIS as well when you view the images?

Yes. That's one of the things I've noticed. The image is not that good, especially when I zoom in. Is there something I need to do to make the images much sharper? I may not have QGIS setup correctly.

When you make a WGS84 (EPSG 4326) GeoTIFF the image will have extends over latitude and longitude as degrees. Say it covers from N52 to N52.1 and from E5 to E5.1. Then it has an extend of 0.1 degrees in both directions. If the image is 1000x1000 pixels, you would have a resolution of 0.00001 degrees per pixel. That's the number you enter in QGIS for the resolution (the actual numbers I use in this example are just made up of course).

Okay, I understand now. Here's what happens when I use the correct projection. I select the EPSG:4326 in the CRS. The resolution will show 3.6 for the horizontal and 3.59941 for the vertical. The Columns and Rows will be something like 100 for the Column and 47 for the Rows. But when I click on Map Canvas Extent, the Columns and Rows go to zero and the resolution remains the same. But when I change the resolution to 0.1 for the horizontal and vertical and click OK, that's when I get the error message that I've talked about.

Ken.
 
Yes. That's one of the things I've noticed. The image is not that good, especially when I zoom in. Is there something I need to do to make the images much sharper? I may not have QGIS setup correctly.
That is determined by the output size or resolution that you enter when saving it. If you enter too low values there, you will get an image that is not so sharp.
Okay, I understand now. Here's what happens when I use the correct projection. I select the EPSG:4326 in the CRS. The resolution will show 3.6 for the horizontal and 3.59941 for the vertical. The Columns and Rows will be something like 100 for the Column and 47 for the Rows. But when I click on Map Canvas Extent, the Columns and Rows go to zero and the resolution remains the same. But when I change the resolution to 0.1 for the horizontal and vertical and click OK, that's when I get the error message that I've talked about.
I would try to enter a resolution like 0.000001 or so, that should give you an output image that is around 1 meter per pixel. 0.1 is still much too big to get details.

Just make sure to zoom in so that the area you want exported is in view. Then use the button to set the extends based on the current view and manually enter the resolution that you want.
 
That is determined by the output size or resolution that you enter when saving it. If you enter too low values there, you will get an image that is not so sharp.

I would try to enter a resolution like 0.000001 or so, that should give you an output image that is around 1 meter per pixel. 0.1 is still much too big to get details.

Just make sure to zoom in so that the area you want exported is in view. Then use the button to set the extends based on the current view and manually enter the resolution that you want.

Hi Arno,

So, the 0.000001 is the resolution in degrees per pixel. I've tried that and everything seems to work okay. It also fills in the numbers for the Columns and the Rows so that they're not zero. Just one question. Let's say one puts in 0.000001 for the horizontal and 0.01 for the vertical, does that effect the proportion of the image or does it only effect the quality of the image?


Thanks so much for clarifying everything,

Ken.
 
I don't see why you want the horizontal and vertical resolution that different, as that will give quite distorted images. So in general I would put them almost the same (only near the poles you might need to adjust to reduce distortion there).
 
I don't see why you want the horizontal and vertical resolution that different, as that will give quite distorted images. So in general I would put them almost the same (only near the poles you might need to adjust to reduce distortion there).

Hi Arno,

I was just using that as an example. I wouldn't make them that different. I just wanted to find out that if one put in 000001 for the horizontal and 0.01 for the vertical if that would have an effect on the proportion of the image. You're right. I would not put in that much of a difference. I would put in the same for both. I'm just trying to determine what cause my output image that I've posted above to be distorted. When I use the method you've posted, everything seems to work okay.

Ken.
 
Hi,

Does anyone know where I can download 1/9 arc second DEM or LIDAR? I found some but the size are in the GB that resample just will not process them or the files are in some other format rather than geo-tiff.

Ken.
 
Very gladly :)

The area doesn't matter? The following WMS service offers LIDAR scan data in North Rhine-Westphalia, Germany, at 1m resolution. You can access it via this link: https://www.wms.nrw.de/geobasis/wms_nw_dgm-schummerung
This is a WMS service (Web Map Service) that must be integrated into QGIS as a WMS service. The data is free (open data).

qgis_new_wms.jpg
lidar_1m_resulution.jpg



Some datasets can also be downloaded directly via a geodata portal, the common formats are .laz / .las / ASCII .txt, .xyz.
You can find many countries and cities online; just search for LIDAR Open Data and WMS.
 
Hi Christian,

Just so you'll know, I want areas for the United States. It doesn't appear that they have areas for the United States.

Ken.
 
Last edited:
Yes, there is LIDAR data for the USA. But the USA is large, very large. So it makes sense to know which part of the USA you need elevation data for.
This example shows the state of New York: https://data.ny.gov/Public-Safety/H...l-Elevation-Models-DEMs-/uzbc-b2qs/about_data

new_york_usa_lidar_1m.jpg



1. Select "Rectangle" in the tool icon.
2. Select the area (rectangle selection).
3. Select the dataset in the left pane and download the tiles
4. Click on the tile(s) to download


EDIT: Here is a very good source for data sets of all kinds: https://catalog.data.gov/organization/
 
Back
Top