Skip to main content
Solved

Copy coordinates from a list in a Lat/Long column

  • November 6, 2024
  • 4 replies
  • 63 views

fme_can_do_it
Enthusiast
Forum|alt.badge.img+11

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

 

 

View original
Did this help you find an answer to your question?

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • November 6, 2024

Hi @fme_can_do_it 

 

Could you share your data?


fme_can_do_it
Enthusiast
Forum|alt.badge.img+11
  • 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+22
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings