Author Topic: Google KML/KMZ to CSV  (Read 873 times)

Jan-Erik Lärka

  • Global Moderator
  • Full Member
  • *****
  • Thank You
  • -Given: 5
  • -Receive: 11
  • Posts: 151
    • View Profile
Google KML/KMZ to CSV
« on: June 12, 2015, 07:37:55 pm »
Hello,

I've been busy writing scripts that help me extract information from Google Maps.

Here's a script that does the opposite, it take a Google Map KML/KMZ file and convert the information into a csv file that can be used within Lotus 123, OpenOffice Calc etc.

It basically tries to unzip the file if it's a .kmz-file and read and interpret the xml-file into something usable. (See attachment if you're logged on)

Parameter: filename.kml or filename.kmz
Additional parameter: output.txt or something that can be used as output with tab separated values
Defaults to Standard Out on screen
Extra parameter: Tag such as "body" to limit the input between that tag but it only work when the environment variable fiberkartan has been set to 1.

//Jan-Erik