Skip to main content
Solved

KML to CSV with lat/lon

  • August 8, 2019
  • 5 replies
  • 129 views

Forum|alt.badge.img

Hello all,

I am doing a simple KML to CSV conversion. For now I need the name and coordinates. I'm unable to extract the coordinates from the kml file, seems like a simple fix. I attached a sample file. Thanks for the help.

Best answer by redgeographics

Since they're all points you could simly set the CoordinateExtractor to do a specific coordinate rather than all

Coordinate index 0 is the first (and, in case of points, the only) one, which will get stored in attributes and automatically added to the CSV writer.

You had it set up for all coordinates which will make a list, even if it's only a point. Lists are a bit tricky to write to most output formats.

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.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • August 8, 2019

Since they're all points you could simly set the CoordinateExtractor to do a specific coordinate rather than all

Coordinate index 0 is the first (and, in case of points, the only) one, which will get stored in attributes and automatically added to the CSV writer.

You had it set up for all coordinates which will make a list, even if it's only a point. Lists are a bit tricky to write to most output formats.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • August 8, 2019

If your geometries are points, you want to use Mode - 'specify coordinate' with a coordinate index of 0 in the CoordinateExtractor.

 

 


Forum|alt.badge.img
  • Author
  • August 8, 2019

Wow, a simple wrong setting. This should get me going. Thanks for the quick response.

Now one more question, how's the simplest way to get a CSV with Name, Lat, and Long fields back to kml?


redgeographics
Celebrity
Forum|alt.badge.img+62

Wow, a simple wrong setting. This should get me going. Thanks for the quick response.

Now one more question, how's the simplest way to get a CSV with Name, Lat, and Long fields back to kml?

In the CSV reader you'll have the option to specify that certain columns contain x and y coordinates, then a CoordinateSystemSetter to set it to LL84 and a KMLPropertySetter to get the Name attribute into kml_name.


Forum|alt.badge.img
  • Author
  • August 8, 2019

In the CSV reader you'll have the option to specify that certain columns contain x and y coordinates, then a CoordinateSystemSetter to set it to LL84 and a KMLPropertySetter to get the Name attribute into kml_name.

@redgeographics Thanks for the info, that makes sense. I get along well with FME Workbench, the trickiest part is selecting the correct transformers to do the job.