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

export geotiff from QGIS

dave hoeffgen

Resource contributor
Messages
1,439
Country
germany
Hello,

First of all sorry for posting such a question which is a bit off the directly FS related part but I didn't really find any suitable stuff on the QGIS documentation and forums and I thought maybe somebody around here may have encountered something similar.

My problem: I imported a web map service (WMS) containing full photoreal coverage of Bavaria. What I need is a certain area in geotiff format to compile with resample.
There is an option "save layer as" which lets me specify output file format and boundary but for some reason it does not save a file.

My current workaround was to "export project as image" which saves the current view to a georeferenced image. I did that a few times and remerged the images using gdalwarp. Sadly I noticed some seams in the resulting image, meaning that a noticable amount of mappin accuracy was lost.

Does somebody know how to properly export a given area at a given resolution from a WMS map?

By the way I double checked that the imagery is free to use under creative commons licence, so I'm not trying to work around any kind of piracy protection.
 
I do not have a step-by-step answer but Google is your friend. I "googled" 'QGIS export TIFF' and got a hit of 1/2 dozen sources to check out. Even saw a YouTube source. Just my 2...
 
I don't work with QGIS, but IMHO, generally speaking in GIS processing, one could minimize complications of misalignment of tiled data sets by first working within a 'non-warped' GIS projection / datum such as "Spherical Web Mercator" (aka "EPSG:3857") prior to merging tiles into a exported working 1-piece (ex: GeoTIFF) sub-section of the data set for the size of the desired extraction area.

One might then perform any required 'warping' and re-projection to ex: Geographic (Lat-Lon) projection / WGS84 datum (aka "EPSG:4326") on the 1-piece (ex: GeoTIFF) sub-section of the data set for the size of the desired extraction area ...to prepare the source data for use with the FS / P3D SDK.

GaryGB
 
Last edited:
I don't work with QGIS, but IMHO, generally speaking in GIS processing, one could minimize complications of misalignment of tiled data sets by first working within a 'non-warped' GIS projection / datum such as "Spherical Web Mercator" (aka "EPSG:3857") prior to merging tiles into a exported working 1-piece sub-section of the data set for the size of the desired extraction area.

One might then perform any required 'warping' and re-projection to ex: Geographic (Lat-Lon) projection / WGS84 datum (aka "EPSG:4326") on the 1-piece sub-section of the data set for the size of the desired extraction area ...to prepare the source data for use with the FS / P3D SDK.

GaryGB

I would export WGS84 if I could to stay within one projection type to avoid misalignment.
Sadly QGIS does not offer any options in that case but rather uses the current screen space as a projection. Meanwhile the project itself is already set in WGS84 projection.

I do not have a step-by-step answer but Google is your friend. I "googled" 'QGIS export TIFF' and got a hit of 1/2 dozen sources to check out. Even saw a YouTube source. Just my 2...
It's the first thing I did. As I said above none of these results address my issue.
 
Again, although I don't use QGIS, it would seem that the OP in another recent Terrain forum thread, has identified a work-flow in QGIS to re-project loaded aerial imagery source data in order to minimize complications from working in a "warped" projection / datum GIS format:

http://www.fsdeveloper.com/forum/threads/usgs-orthoimage-tif-files.439980/page-2#post-771104

That did the trick. The runways and roads are now wonderfully aligned. I followed the procedure here:

https://gis.stackexchange.com/quest...olumns-to-a-point-layer-which-is-not-in-wgs84

1. Select View->Panels->Layers Panel
2. Click on the layer
3. Right click that layer and select Save As
4. Select EPSG:4326 - WGS 84

I didn't even have to save...the coordinates showed up in the Extent right there in the dialog. I then reopened the .bmp in SBuilderX, calibrated it with those new coordinates and changed the MAP name in the same dialog to PHOTO_2, closed the dialog, selected it all and clicked compile. It failed but the INF file was there so I just ran Resample.exe with the INF file. That produced the BGL which I put in my scenery. Here are two images below. As you can see, the runways are pretty much spot on. The zoomed out photo shows the Vector roads lined up as well (the orange circles). Hopefully, this thread will help someone attempting to do the same in the future. Thanks for all the help!

Gregg


BTW: Another complication of working in EPSG:4326 which IIUC, the OP eliminated by working in EPSG:3857 ...is the "Black Collar":

http://www.fsdeveloper.com/forum/threads/usgs-orthoimage-tif-files.439980/page-2#post-771120

Congratulations on your progress thus far ! :D


Next, you may wish to do some further fine-tuning of the intermediate work steps to eliminate the "Black Collar" surrounding the visual image area. :pushpin:

http://www.fsdeveloper.com/forum/threads/black-edges-wgs84-imagery.435663/

AFAIK, one can load and re-project GIS data to perform other tasks in QGIS, then re-project prior to export ...to yet another projection as required by FS / P3D SDK Resample.

GaryGB
 
Last edited:
Again, although I don't use QGIS, it would seem that the OP in another recent Terrain forum thread, has identified a work-flow in QGIS to re-project loaded aerial imagery source data in order to minimize complications from working in a "warped" projection / datum GIS format:




BTW: Another complication of working in EPSG:4326 which IIUC, the OP eliminated by working in EPSG:3857 ...is the "Black Collar":



GaryGB

Did you actually read the OP?
 

Indeed, I did, and I would consider it likely that you also read my replies posted above.

However, you seem thus far hesitant to consider performing the GIS tasks you indicated that you wish to perform in a Datum other than "WGS84"; what "Projection" have you assigned to your GIS data in QGIS ? :scratchch


Bearing in mind that one must use both a Projection and a Datum in GIS data processing, I encourage you again to explore options available in QGIS to re-project a loaded data set during the course of performing certain tasks to a non-warped GIS format, then re-project again during export to a "warped" GIS format such as required by FS / P3D SDK Resample.

Note that by simply choosing a "EPSG: [numeric type] you are assigning both a Projection and a Datum ...in 1 easy procedure. :idea:


Good Luck with your current chosen course of action for your project. :)

GaryGB
 
Indeed, I did, and I would consider it likely that you also read my replies posted above.
I asked because you made assumptions on my workflow which I explicitly stated different, nor do your replies have anything to do with my original question.
Thanks anyway for the effort.
 
Hi Dave:

You are entitled to state your personal "opinion" regarding whether you 'believe' replies to threads you have opened "address my issue" or "have anything to do with my original question", provided that you do so "carefully".

However, a publicly-posted pattern of such behavior that you have demonstrated repeatedly with multiple people over time here at FS Developer forums is IMHO, unlikely to encourage others to help you (or partner with you), and could potentially result in additional complications with your options to access help from others in the future.

Whether or not you say "thanks" does not, IMHO, make it appropriate for you to refer to another person's reply in a negative way, as it characterizes the content of such replies- and potentially the reputation of the person who posts such replies- in a way which might prove rather challenging for you to defend ...in the event that a formal complaint is filed against you.

I believe it would be prudent for you to reconsider how you have repeatedly been treating other forum participants who have taken time in a spirit of good will to try and help you. ;)

Alternatively, you could continue to behave in the same manner and see what consequences may ensue; govern yourself accordingly. :alert:

GaryGB
 
Hi Dave:

You are entitled to state your personal "opinion" regarding whether you 'believe' replies to threads you have opened "address my issue" or "have anything to do with my original question", provided that you do so "carefully".

However, a publicly-posted pattern of such behavior that you have demonstrated repeatedly with multiple people over time here at FS Developer forums is IMHO, unlikely to encourage others to help you (or partner with you), and could potentially result in additional complications with your options to access help from others in the future.

Whether or not you say "thanks" does not, IMHO, make it appropriate for you to refer to another person's reply in a negative way, as it characterizes the content of such replies- and potentially the reputation of the person who posts such replies- in a way which might prove rather challenging for you to defend ...in the event that a formal complaint is filed against you.

I believe it would be prudent for you to reconsider how you have repeatedly been treating other forum participants who have taken time in a spirit of good will to try and help you. ;)

Alternatively, you could continue to behave in the same manner and see what consequences may ensue; govern yourself accordingly. :alert:

GaryGB

Thanks for the clarification that you are offended in such a way by some feedback about how helpful (or not) your reply was in order to solve the original issue.
From my end you can consider yoursel ignored from now.
 
I think you would need a reference for croping or cut those raster. I have seen people talking about shapefiles to such task. In Gis tools like GMapper used kml files and load this to select an área (if I remember well). This link could help to get an idea (above all the second option in the section nº9 to crops raster files) http://www.qgistutorials.com/en/docs/raster_mosaicing_and_clipping.html
I hope this be of help. not sure if this is the issue you are looking for. And really this hobby is sometimes very stressfull....
 
Last edited:
Hi Dave,

try unchecking the "Create VRT" checkbox in the "Save raster layer as..." menu. This will change the output type from "folder" (for the original WMS tiles) to "file" and will allow you to pick a name for your desired output geotiff. See my example screenshot of the Bayern DOP imagery.

Cheers, Holger
 

Attachments

  • QGIS Bayern DOP sample.jpg
    QGIS Bayern DOP sample.jpg
    1.1 MB · Views: 1,222
Hi Dave,

try unchecking the "Create VRT" checkbox in the "Save raster layer as..." menu. This will change the output type from "folder" (for the original WMS tiles) to "file" and will allow you to pick a name for your desired output geotiff. See my example screenshot of the Bayern DOP imagery.

Cheers, Holger
I tried every setting I could find in this dialog. Did that work for you?
If so the problem must be my installation :scratchch
 
Hi Dave,

yes, those are the settings I've used to successfully export from QGIS over the last few months. So you're saying you don't get any output file at all, and no error message either?

Cheers, Holger
 
So you're saying you don't get any output file at all, and no error message either?
It prompts an error at the top of the map that [specified outpus file] is not a valid raster datasource. When I check the file does not exist.
No other error messages.
I'm getting confused now because it works for you with the very same service.
BTW I checked that exporting a layer that way that is a geotiff on my drive works perfectly.

Is there any other special setting?
I see in your screenshot the x and y resolution are something far behing the decimal. What exactly does this resolution mean? degrees per pixel?


EDIT:
I entered your exact numbers in the resolution entry and it actually worked!
 
Last edited:
Hi Dave,

yes, those are pixel dimensions in decimal degrees, as required by the Geographic/WGS coordinate system used in FSX/P3D. In my case I set them so that the source data got exported at about 80-cm resolution.

Obviously, for any given resolution specified in decimal degrees the ground resolution (in m or cm) changes depending on location. I believe there are conversion tools available online though QGIS may actually have in-built tools as well (I'm more familiar with Global Mapper and Manifold GIS).

Cheers, Holger
 
So I was using the vrt option to download a very large area but I noticed that the result after assembling an image with gdalwarp I end up with a bias of 1-2 meters to the north.
Is vrt a bad idea?

(Screenshot shows the resulting image transparent over the original WMS)
 

Attachments

  • offset.jpg
    offset.jpg
    154.8 KB · Views: 682
Last edited:
So I was using the vrt option to download a very large area but I noticed that the result after assembling an image with gdalwarp I end up with a bias of 1-2 meters to the north.
Is vrt a bad idea?

(Screenshot shows the resulting image transparent over the original WMS)
EDMA :-)
 
Back
Top