Solved

KML to CSV with lat/lon

  • 8 August 2019
  • 5 replies
  • 20 views

Badge

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.

icon

Best answer by redgeographics 8 August 2019, 14:48

View original

5 replies

Userlevel 5
Badge +25

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.

Userlevel 1
Badge +21

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

 

 

Badge

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?

Userlevel 5
Badge +25

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.

Badge

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.

Reply