I am using both 50K and 25K Rasters from OS to try to produce smaller scale maps, eg Exmoor, but try as I might I cannot get the OS grid references on the outside of the map grid, the best I have got is on the centimetre or millimetre button to produce figures on the outside of the map, but both X and Y start at 0 not the OS grid reference, I am using CRS ESPG:27700, can anyone help?

  • did you ever get an answer to this? I found using Left(Right(@grid_number,5),2) gives you the result you are looking for. This works as this way... Right(@grid_number,5) reads the final right numbers in the Northing / Easting - which point to the actual grid reference. Left((),2) then tells QGIS to take the first to numbers of the final five to give your '65' The first one (or two, as the northing can be 7 digits) digits tell you the sheet ref number when taken from the X and Y and concatenated. I.e.. X = 265000 and Y = 365000 would give you X = 2, Y = 3. concat (2,3) = 23 = 'SH' My current ta Feb 5, 2019 at 11:22

1 Answer 1


The key thing to things to check are the interval and the projection.

enter image description here

As you can see I've selected 1000m as my interval (with a bigger area you might want to try 5000 and 10000). If your projection isn't set to 27700 (OSGB) then you will end up with weird numbers but you should still see some.

I also set the number format to be to_int( @grid_number) to avoid the annoying the decimal places, by selecting custom in the Draw Coordinates format box, then pressing the E button to open the expression editor.

enter image description here

  • Looks good so far, but how do I set the number format please? and how do you manage to put the image onto the answer please?
    – Derek
    Mar 21, 2016 at 10:43
  • Also how do I get the figure back to teens not thousands, and at the moment the top and bottom have come out as 265000 not 65. Thanks for your help.
    – Derek
    Mar 21, 2016 at 10:48
  • You can convert the grid number into a string and then modify as you need - try something like right( to_string( @grid_number/1000),2)
    – Ian Turton
    Mar 21, 2016 at 10:55
  • I can get into the custom, but unfortunately I am not brilliant on this, what do I change when I am in the E button? And where do I go to change the string for the grid number, sorry to ask again, but a step by step guide would be a big help. Thank you
    – Derek
    Mar 21, 2016 at 11:44
  • I posted a question today that touches on what I think you want to do. gis.stackexchange.com/questions/186271/…
    – nhopton
    Mar 23, 2016 at 19:46

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.