Re: [Qgis-user] custom string formatting for grid coordinate labels
Hi Andrew, Thank you for these useful custom expression functions. It would be quite useful to have the Python unichr() function available in QGIS as an expression function under the "String" functions group. Thanks and greetings, Andreas On 2016-02-18 14:47, Andrew Harfoot wrote: > I have just posted a couple of unicode superscript and subscript functions to > GIS Stackexchange: > http://gis.stackexchange.com/questions/181287 > > Cheers, > > Andy > > On 18/02/2016 13:15, Claas Leiner wrote: > >> Hi, >> >> With Unicode Characters is a good idea. As the code is implemented directly >> in a QGIS-Expression me remains a mystery. >> I have searched for the mark on LibreOffice (insert special characters) and >> then copied using CTRL-C / CTRL-V in the expression. >> >> With this expression: >> >> Case >> when @grid_axis = 'x' then (substr(@grid_number ,1,5) || '⁰⁰⁰ ᴱ') >> when @grid_axis = 'y' then (substr(@grid_number ,1,5) || '⁰⁰⁰ ᴺ') >> end >> >> Do I get the coordinates marking shown in the attached image. >> >> Best wishes >> >> Claas >> >> ___ >> Qgis-user mailing list >> Qgis-user@lists.osgeo.org >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- > Andy Harfoot > > GeoData Institute > University of Southampton > Southampton > SO17 1BJ > > Tel: +44 (0)23 8059 2719 > Fax: +44 (0)23 8059 2849 > > www.geodata.soton.ac.uk [1] > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user Links: -- [1] http://www.geodata.soton.ac.uk ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] custom string formatting for grid coordinate labels
I have just posted a couple of unicode superscript and subscript functions to GIS Stackexchange: http://gis.stackexchange.com/questions/181287 Cheers, Andy On 18/02/2016 13:15, Claas Leiner wrote: Hi, With Unicode Characters is a good idea. As the code is implemented directly in a QGIS-Expression me remains a mystery. I have searched for the mark on LibreOffice (insert special characters) and then copied using CTRL-C / CTRL-V in the expression. With this expression: Case when @grid_axis = 'x' then (substr(@grid_number ,1,5) || '⁰⁰⁰ ᴱ') when @grid_axis = 'y' then (substr(@grid_number ,1,5) || '⁰⁰⁰ ᴺ') end Do I get the coordinates marking shown in the attached image. Best wishes Claas ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user -- Andy Harfoot GeoData Institute University of Southampton Southampton SO17 1BJ Tel: +44 (0)23 8059 2719 Fax: +44 (0)23 8059 2849 www.geodata.soton.ac.uk ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] custom string formatting for grid coordinate labels
Hi, With Unicode Characters is a good idea. As the code is implemented directly in a QGIS-Expression me remains a mystery. I have searched for the mark on LibreOffice (insert special characters) and then copied using CTRL-C / CTRL-V in the expression. With this expression: Case when @grid_axis = 'x' then (substr(@grid_number ,1,5) || '⁰⁰⁰ ᴱ') when @grid_axis = 'y' then (substr(@grid_number ,1,5) || '⁰⁰⁰ ᴺ') end Do I get the coordinates marking shown in the attached image. Best wishes Claas ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] custom string formatting for grid coordinate labels
That's an excellent idea - thanks for sharing! Andreas On 2016-02-17 10:42, Andrew Harfoot wrote: > Hi Uwe, > > If you can't use formatting tags, then possibly Unicode is your friend here - > have a look at characters U1D31 and U1D3A - superscript E and N respectively. > Using these should allow you to generate labels like this: 0234ᴱ or 345389ᴺ > > Cheers, > > Andy > > On 16/02/2016 18:48, Nyall Dawson wrote: > >> On 17 Feb 2016 2:20 AM, "Uwe Fischer"wrote: >>> >>> Hello List, hello Nyall, >>> >>> >>> >>> I have a question concerning the grid coordinate labels for map frames in >>> print composer. If you set the label format to „custom", you get to >>> „Expression based annotation" box where you can build expressions for >>> formatting, e.g. concat(left(@grid_number,3) , 'E'). That works fine >>> in the editor and the footnote preview shows exactly the desired result (E >>> as an above positioned little index). But, in the map composer canvas, the >>> format string is rendered as text, that means E shows up as a text >>> string there. >>> >>> >>> >>> Is there a way to apply the format rule (which seems to work) correctly to >>> the map composer? >> >> Not currently - there's no support for formatting in the coordinate text. >> >> Nyall >> >>> >>> >>> >>> Regards and thanks a lot, >>> >>> >>> >>> Uwe >>> >>> >> >> ___ >> Qgis-user mailing list >> Qgis-user@lists.osgeo.org >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- > Andy Harfoot > > GeoData Institute > University of Southampton > Southampton > SO17 1BJ > > Tel: +44 (0)23 8059 2719 > Fax: +44 (0)23 8059 2849 > > www.geodata.soton.ac.uk [1] > > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user Links: -- [1] http://www.geodata.soton.ac.uk ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] custom string formatting for grid coordinate labels
Hi Uwe, If you can't use formatting tags, then possibly Unicode is your friend here - have a look at characters U1D31 and U1D3A - superscript E and N respectively. Using these should allow you to generate labels like this: 0234ᴱ or 345389ᴺ Cheers, Andy On 16/02/2016 18:48, Nyall Dawson wrote: On 17 Feb 2016 2:20 AM, "Uwe Fischer"> wrote: > > Hello List, hello Nyall, > > > > I have a question concerning the grid coordinate labels for map frames in print composer. If you set the label format to „custom“, you get to „Expression based annotation“ box where you can build expressions for formatting, e.g. concat(left(@grid_number,3) , 'E'). That works fine in the editor and the footnote preview shows exactly the desired result (E as an above positioned little index). But, in the map composer canvas, the format string is rendered as text, that means E shows up as a text string there. > > > > Is there a way to apply the format rule (which seems to work) correctly to the map composer? Not currently - there's no support for formatting in the coordinate text. Nyall > > > > Regards and thanks a lot, > > > > Uwe > > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user -- Andy Harfoot GeoData Institute University of Southampton Southampton SO17 1BJ Tel: +44 (0)23 8059 2719 Fax: +44 (0)23 8059 2849 www.geodata.soton.ac.uk ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] custom string formatting for grid coordinate labels
On 17 Feb 2016 2:20 AM, "Uwe Fischer"wrote: > > Hello List, hello Nyall, > > > > I have a question concerning the grid coordinate labels for map frames in print composer. If you set the label format to „custom“, you get to „Expression based annotation“ box where you can build expressions for formatting, e.g. concat(left(@grid_number,3) , 'E'). That works fine in the editor and the footnote preview shows exactly the desired result (E as an above positioned little index). But, in the map composer canvas, the format string is rendered as text, that means E shows up as a text string there. > > > > Is there a way to apply the format rule (which seems to work) correctly to the map composer? Not currently - there's no support for formatting in the coordinate text. Nyall > > > > Regards and thanks a lot, > > > > Uwe > > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] custom string formatting for grid coordinate labels
Hello List, hello Nyall, I have a question concerning the grid coordinate labels for map frames in print composer. If you set the label format to "custom", you get to "Expression based annotation" box where you can build expressions for formatting, e.g. concat(left(@grid_number,3) , 'E'). That works fine in the editor and the footnote preview shows exactly the desired result (E as an above positioned little index). But, in the map composer canvas, the format string is rendered as text, that means E shows up as a text string there. Is there a way to apply the format rule (which seems to work) correctly to the map composer? Regards and thanks a lot, Uwe ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user