Skip to main content
deleted 40 characters in body
Source Link
MrXsquared
  • 35.6k
  • 22
  • 71
  • 121

Here is a more complicated approach:

In your grid properties first make sure youto choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

Here is a more complicated approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

In your grid properties first make sure to choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

Just beeing honest ;)
Source Link
MrXsquared
  • 35.6k
  • 22
  • 71
  • 121

Here is a simplemore complicated approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

Here is a simple approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

Here is a more complicated approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

simplified expression.. however, the result is the same...
Source Link
MrXsquared
  • 35.6k
  • 22
  • 71
  • 121

Here is a simple approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without algebraic sign-) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        right(to_dmsif(@grid_number,'x',1@grid_number<0,'suffix')'W',1'E'), -- ifIf grid axisnumber is x,negative extractand theaxis suffixis fromx, to_dms()use whichW, iselse E oras Wsuffix
        right(to_dmsif(@grid_number,'y',1@grid_number<0,'suffix')'S',1'N') -- ifIf grid number is negative and axis is y, use S, else N oras Ssuffix
    )
)

Result:

enter image description here

Here is a simple approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat grid number without algebraic sign with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        right(to_dms(@grid_number,'x',1,'suffix'),1), -- if grid axis is x, extract the suffix from to_dms() which is E or W
        right(to_dms(@grid_number,'y',1,'suffix'),1) -- if grid axis is y, use N or S
    )
)

Result:

enter image description here

Here is a simple approach:

In your grid properties first make sure you choose EPSG:4326 as CRS, then choose "custom" as coordinate format and click on the expression button next to it:

enter image description here

Now use this expression:

abs(@grid_number) ||  '°' || -- concat absolute grid number (without -) with °
if(@grid_number=0,'', -- if grid number is 0, dont use a suffix
    if(
        @grid_axis = 'x', -- determine which grid axis it is
        if(@grid_number<0,'W','E'), -- If grid number is negative and axis is x, use W, else E as suffix
        if(@grid_number<0,'S','N') -- If grid number is negative and axis is y, use S, else N as suffix
    )
)

Result:

enter image description here

Post Undeleted by MrXsquared
added 320 characters in body
Source Link
MrXsquared
  • 35.6k
  • 22
  • 71
  • 121
Loading
Post Deleted by MrXsquared
Source Link
MrXsquared
  • 35.6k
  • 22
  • 71
  • 121
Loading