Skip to main content
Question

WGS84 format for float from a string.

  • February 18, 2013
  • 8 replies
  • 56 views

fmelizard
Safer
Forum|alt.badge.img+21

I have some exif GPS data that I want to plot points for. These are strings:

 

 

 

jpeg_exif_gpslatitude    (54) (59.0226) (0)

 

jpeg_exif_gpslongitude    (1) (44.0662) (0)

 

 

My problem is - how do I get these into a format 2d point adder will use? I can easily strip the brackets, but then its still a string and I get this:

 

 

2013-02-18 17:01:35| 0.6| 0.0|ERROR |2DPointAdder: @Tcl2 -- failed to evaluate expression `FME_Coordinates addCoord {1 44.0662 0} {54 59.0226 0}' -- String value `1 44.0662 0' contains invalid characters and could not be converted into a float

 

 

Thanks.

 

 

Note: Sorry about the colour etc. That's what happens when you copy/past it seems and there's no "reset" button.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

owen
Forum|alt.badge.img+1
  • February 18, 2013
Hi Jonathan,

 

 

I had to do this recently. You need an attributesplitter to split the degrees, minutes & seconds into sepreate fields, then use an expression evaluator to conver to decimal degrees.

 

 

More info here http://fmepedia.safe.com/articles/Samples_and_Demos/DMS-to-Decimal-Degrees-Workspace

 

 

Owen

fmelizard
Safer
Forum|alt.badge.img+21
  • Author
  • Safer
  • February 18, 2013
Hey Owen, much appreciated, that worked a treat. Well, except the few seconds where I wondered why I was in the North Sea. Must remember west is negative. ;-)

 

Cheers,

 

Jonathan

davideagle
Contributor
Forum|alt.badge.img+22
  • Contributor
  • February 20, 2013
The DecimalDegreesCalculator can be pretty handy in these cases too. I think it was the solution to 'packaging' the formula for the conversion.

fmelizard
Safer
Forum|alt.badge.img+21
  • Author
  • Safer
  • February 20, 2013
Thanks Dave. That transformer didn't come up when I did my searching. I was searching for "longitude" and "latitude".

 

 

Safe: Could you add "longitude", "latitude" and "WGS84" to the keywords for that transformer.

mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • February 20, 2013
"Safe: Could you add "longitude", "latitude" and "WGS84" to the keywords for that transformer"

 

 

I will file a request with the development team to do just that. Thanks for the suggestion.

 

 

Mark

mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • February 21, 2013
Added the keywords (and a couple of others) in build 13429 - so I expect this will be in 2013 Service Pack 1 when it is released.

fmelizard
Safer
Forum|alt.badge.img+21
  • Author
  • Safer
  • February 21, 2013
Thanks Mark. I appreciate its hard to know what people will search for. :-)

hakans
Contributor
Forum|alt.badge.img+8
  • Contributor
  • June 26, 2013
This is a common quest, I guess. 

 

Does anyone have the proper Format String for the AttributeSplitter, and is willing to share it?

 

 

(SAFE: or putting it in an ExifPos2point transformer?!)