3

I am trying to save a QGIS layer (the layer in question is an STRM geotiff, downloaded from Earthexplorer with resolution 1801 x 3601) in the project CRS projection (WGS 84 EPSG:3857), as an image file. However, no matter which options I choose it ALWAYS saves in the native resolution of 1801 x 3601. The layer appears perfect in the QGIS project window, but the saved-as image is always 1801 x 3601. (the WGS 84:3857 should be approx 1801 x 3200 I think, based off a basic measurement of the width x height in the project window). In the save as options, there is even a drop down list to select the CRS, but it has no effect on the final image produced.

(The screen grab below is not using 3857 CRS but still demonstrates the problem I am having)

I can change the resolution manually, I know, but for my project I need the rendered image to be exactly as per the WGS84 EPSG:3587 resolution.

enter image description here

  • What is the native CRS of your image? I suppose it is EPSG:4326, right? And if you tell QGIS to save the image in EPSG:3857 the resolution and Columns/Rows do not change for you? Remember that x-resolution and y-resolution do not need to be the same. Conversion from 4326 into 3857 does not include rotation so the columns/rows count can remain the same but resolution should change quite a lot from degrees into meters. – user30184 Oct 5 '17 at 17:24
  • I am not sure of the original CRS, I cannot find anything definitive on the NASA website about the SRTM mission. However, the fact that the layer in my project window appears square when using EPSG 4326 and the rendered image is not, tells me something is definitely wrong. All i want to do is save the layer as an image file exactly as it appears in the project. I must be mssing something but cannot seem to figure it out. – jall Oct 5 '17 at 18:59
  • You deal perhaps with this thing about non-square pixels gis.stackexchange.com/questions/243225/…. Are you viewing the saved image with some non-GIS viewer? – user30184 Oct 5 '17 at 19:40
  • I am yes, just a basic photo viewer and also GIMP. I guess this is the issue then. So, if I am understanding correctly, it is not possible to save a layer as an image file with the same resolution as the project CRS, such that it can be read by an image viewer? It can only be read correctly by a GIS viewer? (I have attempted it with print composer, but it is near impossible to fit the layer onto to the paper pixel perfect, so that is not an option for me). Any idea of how to save the image to the CRS resolution?. – jall Oct 5 '17 at 20:06
  • I do not know what you mean with the CRS resolution but image should have right aspect in GIMP if you adjust the horizontal and vertical resolutions to be equal. Save raster as... does not have an automatic setting for that but by some scripting and the gdal_translate method from the previous link you should be able to do it. – user30184 Oct 5 '17 at 20:37
3

Works for me with QGIS 2.18.10. See the screen capture

enter image description here

I verified with gdalinfo that the saved image really had the size 27392x12000.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.