16.06.2017

Excel to KML Two Way Converter



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.


from Google Earth Blog http://ift.tt/2rvBQ28 http://ift.tt/2rvnRtj
via IFTTT