No BSD License  

Highlights from

3.7 | 3 ratings Rate this file 69 Downloads (last 30 days) File Size: 4.98 KB File ID: #13026 Version: 1.0



Amy Farris (view profile)


16 Nov 2006 (Updated )

Reads a Google Earth .kml file into Matlab

| Watch this File

File Information

Reads in a simple Google Earth kml into Matlab. If you have bought Google Earth Plus, you can digitize 'paths' (lines). This funcion allows you to load one of these saved paths into Matlab. This code extracts lat,lon and z from a kml file.

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
03 Nov 2015 Kyle Spencer

Would this still work if you converted your google earth pro in to UTM coordinates?

Comment only
25 Sep 2012 Joao

Joao (view profile)

Great, but kml document breaks coordinates if there are more than 1000 points.
So in this function you just pick the first 1000 points.
Maybe with another if, you can check if there are a second block of coordinate.


02 Oct 2009 Erdal Bizkevelci  
27 Jun 2008 Evan Artis

Testing it out.

Comment only
23 Nov 2006 Malcolm Wood

Nice function. I think you could make it much more robust to mis-placed spaces by using "xmlread" and then the W3C XML-handling classes, e.g.:
>> doc = xmlread(fileName);
>> c = doc.getElementsByTagName('coordinates').item(0);
>> coord_str = c.getChildNodes().item(0).getData();

Contact us