Skip to main content
Solved

Convert decimal coordinate tom DMS format with hemisphere ( E / N)

  • March 10, 2026
  • 4 replies
  • 75 views

fakimochere
Contributor
Forum|alt.badge.img+3

Hello, 

I’m trying to convert decimal coordinates into a DMS format with hemisphere indication.

 

Example : 1.4861803 ; 43.5713123

 

Target format : 1°29’10.2491” E ; 43°34’16.7243” N

In my workflow, i used DMSCalculator transformer to split the coordinates into degrees, minutes and seconds. This part works correctly.

However, I am now stuck when trying to reconstruct the final formatted string. 

Does anyone know the best approach to rebuild this format ?

Thanks advanced,

Best answer by nielsgerrits

One way to do this is to use an AttributeCreator with lon = @Value(x_degrees)°@Value(x_minutes)’@Value(x_seconds)” E.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+66
  • Best Answer
  • March 10, 2026

One way to do this is to use an AttributeCreator with lon = @Value(x_degrees)°@Value(x_minutes)’@Value(x_seconds)” E.


fakimochere
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • March 11, 2026

Hello, thank you for your response. That is the solution I am currently using.
Is there a transformer that calculates this format directly?


nielsgerrits
VIP
Forum|alt.badge.img+66

Not that I know of, but there are plenty transformers on the FME hub which I never have used so...


DanAtSafe
Safer
Forum|alt.badge.img+23
  • Safer
  • March 12, 2026

Hi ​@fakimochere You could easily make a custom transformer from the DMSCalculators and the AttributeCreator:

custom transformer

Or you could put all of the math from the DMSCalculators into the AttributeCreator:

@int(@Value(_x))°@int(@int(@abs(@Value(_x)) * 3600.0)%3600 / 60.0)'@fmod(@abs(@Value(_x)) * 3600.0,60)"E; @int(@Value(_y))°@int(@int(@abs(@Value(_y)) * 3600.0)%3600 / 60.0)'@fmod(@abs(@Value(_y)) * 3600.0,60)"N