I have GPS coordinates in decimal format (as double number). I have converted them to the KNIME format Coordinate (Latitude/Longitude to Coordinate node).
In the view of the table I can choose between the renders. If I choose to show the coordinates for example in DMS format all works fine.
But when I want to export this data in the excel file it is in decimal format.
How can I export the data in the chosen rendered format?
Can you share your workflow so we can see what you are doing?
EDIT: I don’t have experience with GPS renderers, but my guess is that it’s the renderer that’s generating the visual that you see based on the GPS coordinates. Excel is not a GPS renderer, so it’s normal that you will see the coordinates instead.
If you want to export the visual into Excel, you most probably would need to convert the visual into images first.
Think of it this way: You have a csv file, which is basically text separated by commas. If you open it via a text editor, that’s what you will see. If you open it in Knime or Excel, you will see it in a table. Knime and Excel “renders” the csv in a table. A text editor cannot render the text in a table.
Ahhh, I see what’s DMS format is now. Thanks for sharing.
Yes, it looks like it’s not in a text format (you can see the type of each column in the column headers). It’s of type Coordinate actually.
It does not seem like Excel has this type of column, so you may need to manually create the string with math formula and string manipulation as you mentioned (great suggestion actually - may be String Manipulation alone would be enough).
EDIT: It looks like there are some calculations to be done from the Lat and Lon, I thought it was a direct concatenation, but it’s not. So you might need the Math Formula too in the end.
I found some formula online that a person implemented directly in Excel, but certainly can be used in Knime:
The renderers are provided by Palladian and I think it definitely makes sense to have this as a proper formatter node and not only as “renderer”. Let me see if this is something we can add! I’ll keep this thread updated.
The correct expression in the two string manipulation nodes are
It looks like the Seconds value might vary a little. It was driving me crazy as I kept getting 22 (22.8 to be exact) instead of 24. This made me believed that maybe the guy’s formula was not correct, so I used the formula from Wikipedia:
But I was getting the same results with this formula too. Finally I ran it via Knime’s Latitude/Longitude to Coordinate node, and I was getting 22. I guess it can vary depending on our own location? Anyways, I get the same value as Knime’s node.
Also, Knime’s node seems to floor the Seconds value, so I implemented it the same way.