0

I am attempting to export an approximately 16,000 x 6,000 PNG image of North America at 1:5,000,000 scale with QGIS. The initial problem I am having is whenever I change the scale (in either the image export or print layout settings), it will change the extent, and whenever I change the extent, it changes the scale. There was another post that suggested using a fixed value for the scale, however this does not appear to work in the current (3.34) version of QGIS. Specifically, the scale does remain fixed, however when I edit one extent, QGIS replaces the extent value I entered with another value and also changes the other three extent values.

I'm not sure what I might be doing wrong. Is there a different way to do this?

Link to the post referenced above: QGIS Print layout - map scale changes after matching map extent to main canvas extent

Edit: It appears QGIS is applying some sort of logic to change all of the extents when I change one, but I am not sure what it is doing exactly.

Edit 2: My best guess now is that it is changing the extent to what I entered, but then moving the center of the map back to where the center of the previous extents had it, which changes the extents again. It seems if I keep entering what I want over and over again, the value QGIS replaces it with eventually approaches what I entered. My head is hurting trying to figure out what the logic is doing here.

The image shows the values I would like to change (red box) without changing the scale (first yellow box). The dimensions (second yellow box) can change as needed to match the new extents.

Print layout

4
  • 6
    Correct me if I've misunderstood here, but I think what you're describing is typical/expected behaviour - if the scale is fixed, when you edit one of the extent parameters, QGIS will change the others so that the scale is maintained while being in the same map item. You may want to change the actual size of your map item to be able to get the extent you want.
    – she_weeds
    Commented Jan 21 at 2:46
  • A link to the post you refer to would be helpful as well as a screenshot showing what you have.
    – Babel
    Commented Jan 21 at 11:40
  • she_weeds it changes all of the extents, including the one I just entered. I'll try moving the map item size, however this would be a tedious process as I have the exact extents I want and I'm not sure I'd be able to be that precise with a mouse.
    – John
    Commented Jan 21 at 20:45
  • she_weeds Changing the extents using the map handles with a mouse does change the extents, however it is imprecise and seems to move the center of the map.
    – John
    Commented Jan 21 at 22:46

1 Answer 1

0

I figured out how to do this using the Project -> Import/Export option. The problem I was having before is that when you enter an extent, QGIS tries to parse it immediately as you type. This can result in impossible states, such as when your max is less than your min value, and results unusual behavior such as setting the other values to NaN or making the pixel dimensions 1x1. I was able to work around this by pasting in values in the right order so the extents always resulted in a sensical value. The extents in that export box (and probably other places) could have an Apply button, so you can enter them all before it tries to draw a box. At a minimum, an error message would be helpful.

Exporting a large image with a particular scale still requires vector data and will not work with map tiles as they are pre-rendered. I used OSM data combined with some other state level border data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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