No BSD License  

Highlights from
read_kml

3.5

3.5 | 2 ratings Rate this file 22 Downloads (last 30 days) File Size: 4.98 KB File ID: #13026

read_kml

by Amy Farris

 

16 Nov 2006 (Updated 27 Nov 2006)

Reads a Google Earth .kml file into Matlab

| Watch this File

File Information
Description

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
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();
etc.

27 Jun 2008 Evan Artis

Testing it out.

02 Oct 2009 Erdal Bizkevelci  
Please login to add a comment or rating.
Updates
27 Nov 2006

Improved parsing of Latitude and Longitude. Old method occasionally gave wrong results.

Tag Activity for this File
Tag Applied By Date/Time
google earth Amy Farris 22 Oct 2008 08:49:28
kml Amy Farris 22 Oct 2008 08:49:28
read_kml Amy Farris 22 Oct 2008 08:49:28
function Amy Farris 22 Oct 2008 08:49:28
google earth plus Amy Farris 22 Oct 2008 08:49:28
earth Amy Farris 22 Oct 2008 08:49:28

Contact us at files@mathworks.com