Skip to main content
Solved

Copy coordinates from a list in a Lat/Long column

  • November 6, 2024
  • 4 replies
  • 98 views

fme_can_do_it
Enthusiast
Forum|alt.badge.img+12

I had a pair of coordinates stored in a single column named "geometry." I used the Attribute Splitter to separate these coordinates and then exploded the list. Now, I have each latitude and longitude in the same column. Is there a way to copy these latitude and longitude values into separate columns labeled "Latitude" and "Longitude" while maintaining the same order?

Best answer by bwn

Separate the List Index integers into Odds and Evens using fmod() in a Tester.

Then can rename it to LONG an d LAT value attributes and merge them back together with FeatureJoiner.

 

 

Output from FeatureJoiner

 

 

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.

4 replies

danilo_fme
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • November 6, 2024

Hi @fme_can_do_it 

 

Could you share your data?


fme_can_do_it
Enthusiast
Forum|alt.badge.img+12
  • Author
  • Enthusiast
  • November 6, 2024

Sure! here is the data i read in an excel format in my workspace:

geometry
 

-97.366166, 32.747101,-97.367519, 32.746789, -97.369184, 32.746717,-97.369023, 32.748890

 

I have also attached the screenshot of my workspace.

 


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • Best Answer
  • November 6, 2024

Separate the List Index integers into Odds and Evens using fmod() in a Tester.

Then can rename it to LONG an d LAT value attributes and merge them back together with FeatureJoiner.

 

 

Output from FeatureJoiner

 

 


todd_davis
Influencer
Forum|alt.badge.img+23
  • Influencer
  • November 6, 2024

I went with a GML Approach, as I don’t need to breakup the input at all...just format it. It is because GML has a PosList that allows you to put in space seperate line of coordinates. I am assuming that these are all lines

 

You just need to update this to your attribute:

 

And because it is in long/lat, choose 1,2 in the SRS axis in the geometryreplacer. SRS Axis just explains the order or X,Y,Z.

Workspace attached.