My AOI table looks like

enter image description here

I have the following settings in the map frame.

enter image description here

Notice the scale is not a round value.

I have tried to change the value for 'Margin around feature' to 0 but this doesn't change it. The AOI polygons are set to be exactly 1:10k, 5k, 2.5k

I have also tried to set the properties-->view settings to these values and also the override to be "Scale"

enter image description here

I was expecting functionality similar to Data Driven Pages in ArcMap - https://desktop.arcgis.com/en/arcmap/10.3/map/page-layouts/creating-data-driven-pages.htm#ESRI_SECTION1_9F531CE4A9E24F2D900F87CE6A328876

Linked to this, how can I get the scale bar and text to be a fixed length but change the tick marks based on the scale with the items centered?

enter image description here

enter image description here

with settings as

enter image description here

I am using 3.22

  • 3
    Have you tried data defined with your field but with "fixed scale" selected ? Commented Nov 18, 2021 at 14:08
  • Just tried it - it just shows all the data and doesn't use the scale value. The data defined box seems to be only connected to the "Margin..." function.
    – GeorgeC
    Commented Nov 18, 2021 at 21:46

3 Answers 3


You could try "predefined scale (best fit)" under Map Item properties.

enter image description here

Set the scales under Settings - Options - Map tools:

enter image description here


I just checked under QGIS and it can be data defined.

Go to the Scale right dropdown

map item properties

and select "Edit...", paste the following QGIS expression :

attribute(@atlas_feature, 'scale')

The expression retrieves the atlas feature with the atlas context variable, and with this feature and the function attribute, get the corresponding scale value.

  • I tried this with the atlas properties set to 'Fixed Scale' and also 'Margins...' but it didn't work. It zooms to a scale smaller than the AOI. I will edit the question with an example.
    – GeorgeC
    Commented Nov 18, 2021 at 22:36
  • My mistake - the AOI polygon wasn't set correctly for the scale I tested. It works perfectly on the other scales with the Margin set to 0. Do you know how to work out the 2nd part of the question to get the scale bar to stop expanding/contracting when you go from 1:2500 to 1:10,000 and scales in between.
    – GeorgeC
    Commented Nov 18, 2021 at 22:55
  • Can you create a new question post ? I think it's better to help other people with just a part of your problem. This one is resolved. Commented Nov 19, 2021 at 8:21
  • Ok, thanks please see gis.stackexchange.com/questions/416790/…
    – GeorgeC
    Commented Nov 19, 2021 at 12:32

I have found the solution to roundup the scale to nearest 100s, 500s, 1000s, etc, using the following expression in the Map frame scale property :

if(bounds_width(@geometry)/ bounds_height(@geometry)>=1,((bounds_width(@geometry)/0.350)//100+1)*100,((bounds_height(@geometry)/0.290)//100+1)*100)

where, 100 can be replaced by any other multiplier such as 500 or 1000, etc. the 0.350, and 0.290 are the Width and Height of the map frame, which can be changed based on your specific map frame dimensions.

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.