My Google Map Blog

Archive for June 14th, 2017

Excel to KML Two Way Converter

by Timothy Whitehead on Jun.14, 2017, under 3D Models, Argentina, Australia, Brazil, California, Denmark, England, Germany, Google Earth News, Google Earth Tips, Google Sky, Google maps, Hawaii, Indonesia, Ireland, Italy, Japan, Kenya, Mexico, Natural Landmarks, Netherlands, Sightseeing, Street Views, USA

In January we created a simple KML converter that takes a KML file and produces a csv file that is easily opened with Microsoft Excel. Recently GEB reader David Kettle asked whether it would be possible to go both ways.

So, we have used an open source tool called SheetJS for reading and writing Excel files in JavaScript and have made a two way process.

To use it, simply upload a KML or KMZ file below and it will extract all the placemarks, paths or polygons into an Excel file. You can then edit the data in the Excel file then upload that and it will convert it back to a KML file.


 

Notes:

  • All styles, folders, etc., are lost in the conversion.
  • It only extracts the outer edge of a polygon. If there are ‘cutouts’ then they will be ignored.
  • It doesn’t currently extract folder names. We will consider adding that as a feature in the future.
  • It extracts the longitude/latitude/altitude data in the format used in KML rather than separating them into columns. This was to make it easier to handle both points and polygons.
  • When we tried it on very large polygons, Excel gave an error – most likely caused by a limit on the amount of text allowed in a single cell.

The intent was not to create a universal converter but to provide a very simply utility, and to give those with some programming knowledge a starting point if they wish to create something more complex. Feel free to use any of the code used in the page. The original KML API can be found here The version used in the page was run through Babel to make it compatible with older browsers.

The post Excel to KML Two Way Converter appeared first on Google Earth Blog.

Comments Off : more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...