kml2kmz copies all the support documents used by the kml into a single 'files' folder, and updates the file path in the kml to the new relative path accordingly. The kml is also copied, then zipped up with the new copies of supporting files. The zip file is then renamed with a .kmz extension, and put in the same folder as the original kml. The new copies of supporting documents are then deleted by default. Supporting documents referenced by KML attributes are not yet supported.
Thanks! Don't mind at all, please include.
Hi, really nice code, would you mind if I include your code into the my kml toolbox? (FE: http://www.mathworks.com/matlabcentral/fileexchange/34694-kml-toolbox-v2-3)
v2.1 - added conditional check for existing, but empty, elements
Added online file download, improved error detection, and does not copy identical files more than once.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.