Feature request #9292

Custom Format for Grid Coordinates

Added by Klas Karlsson almost 4 years ago. Updated about 2 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Map Composer/Printing
Pull Request or Patch supplied:No Resolution:
Easy fix?:No

Description

Would it be possible to get a "custom" format for "Draw Coordinates" in the Composer.

(picture 1)

When selecting "custom" a similar box as for normal labels could get activated.

(picture 2)

This way I could get a label in any projected coordinate system displayed in any way I want. The example in the picture takes the y_coordinate and extracts to digits representing the kilometre value in a 100 km x 100 km box (i.e. UTM coordinates).
In the same way I could "build" more complicated grid labels with custom texts etc.

The above is only a suggestion for getting more flexible options for creating labels. Another option would be to add new formats in a config-file in some way.

09.png - picture 2 (62.4 KB) Klas Karlsson, 01/05/2014 03:37 AM

54.png - picture 1 (196 KB) Klas Karlsson, 01/05/2014 03:37 AM

Suggested_fix.png (204 KB) Klas Karlsson, 10/28/2014 01:33 PM


Related issues

Related to QGIS Application - Feature request #10301: [composer] Support formatting for grid coordinates Open 05/18/2014

Associated revisions

Revision e8c3afa3
Added by Nyall Dawson about 2 years ago

[FEATURE][composer] Custom format for grid annotations (fix #9292)

Allows composer map grid annotations in custom formats which are
evaluated using QgsExpressions. Made possible through the use
of Expression Contexts(tm)!

History

#1 Updated by Klas Karlsson almost 4 years ago

Would also solve Feature #7804...

#2 Updated by Klas Karlsson about 3 years ago

Why not add a "data defined" option for the "Draw Coordinates" > "Format" option...

see attached file

As long as the coordinate intended for use at the grid line as a label is available in the "function list" (ex: $gridlinevalue ) You could do pretty much anything with the labels.

#3 Updated by Nyall Dawson about 3 years ago

That's the plan. It's dependent on #9546 though.

#4 Updated by Ian Holt over 2 years ago

Apologies if this is the wrong place to post this.
The last comment on this issue was 10 months ago.
Does anyone know if there have been any further thoughts?
Being able to be more flexible in the good coordinates in Print Composer means I have to take the image I generate and use other software to create more pleasing labelling,
i.e. rather that 460000 461000 462000 It could read 460000 461 462 (maybe with the 4 and trailing 0s as superscript?
Or if anyone can point me towards a way of creating more flexible labelling outside QGIS, then I would be very appreciative.

#5 Updated by Nyall Dawson about 2 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF