1

I'm struggling to accurately export a map I have using QGIS. I am using the Import/Export > Export Map to Image function. My map is based on a 600x800 pixel raster on which I have overlayed other stuff. I want to export the map as a 600x800 pixel image to exactly cover what I have created and to preserve the original GeoTIFF resolution.

In the Save Map as Image dialog I select "Calculate from Layer" to set the correct extent. The number of pixels at this point is wrong. I lock the output aspect ratio and then try to alter the number of pixels to 600x800, but that starts to change the extent, which is not what I want. When I alter the number of pixels, I want QGIS to alter the Scale or Resolution accordingly and leave the extent to what I set it at. How do I do that? My GeoTIFF has a resolution of 50 metres per pixel, so that is what I want to be able to specify in QGIS.

If I try and change the Scale manually, that also changes the extent.

The only option that leaves the extent unchanged is altering the Resolution. But the issue here is that the increments are not fine grained enough: I get 597 or 607 pixels wide, not 600.

What is this dpi thingy? Dots per Inch? That sounds like some archaic measurement system that only the USA uses, the rest of the world has long since moved on to metric. Anyway, what does DPI mean in this context? I am not printing or creating an image that has a real physical size. My image co-ordinate system is in metres, so if I have to provide a scale & resolution, then I need to set them in metric units too.

Why is this seemingly simple operation so frustratingly complex and not providing an exact result?

  • This sounds like an XY problem, can you rephrase your question to tell us what you actually want, because I don't think this is what export as image is for – Ian Turton Feb 5 at 10:58
1

You can try to go over the mapcomposer. to get the page size dialog, right click into the empty page and choose page properties. Just change the size to your desired size 600x800 and choose pixel from the list. then put your map over the full size and then go to export. That should work.

enter image description here

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.