Write geographic line data to KML file
kmlwriteline( writes
the geographic line data specified by filename,latitude,longitude)latitude and longitude to
the file specified by filename in Keyhole Markup
Language (KML) format. kmlwriteline creates a KML
Placemark element for each line, using the latitude and longitude
values as the coordinates of the points that define the line. kmlwriteline sets
the altitude values associated with the line to 0 and
sets the altitude interpretation to 'clampToGround'.
kmlwriteline(___, specifies
name-value pairs that set additional KML feature properties. Parameter
names can be abbreviated and are case-insensitive.Name,Value)
If you do not see your line, set AltitudeMode to 'clampToGround'.
If the line appears, then you may have a problem with your altitude
value.
You can view KML files with the Google Earth™ browser, which must be installed on your computer.
For Windows, use the winopen function:
winopen(filename)
For Linux, if the file name is a partial path, use the following commands:
cmd = 'googleearth ';
fullfilename = fullfile(pwd, filename);
system([cmd fullfilename])
For Mac, if the file name is a partial path, use the following commands:
cmd = 'open -a Google\ Earth '
fullfilename = fullfile(pwd, filename);
system([cmd fullfilename])
You can also view KML files with a Google Maps™ browser. The file must be located on a web server that is accessible from
the Internet. A private intranet server will not suffice because Google’s server must be
able to access the URL that you provide. The following is a template for using Google Maps. Replace your-web-server-path with a real value.
GMAPS_URL = 'http://maps.google.com/maps?q='; KML_URL = 'http://your-web-server-path'; web([GMAPS_URL KML_URL])