Skip to main content
Solved

KML to CSV with lat/lon


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.

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

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+48
  • 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+31
  • 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+48
djcad wrote:

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
redgeographics wrote:

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.


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