kml.point
Places markers in the coordinates defined by longitude, latitude and altitude.
Contents
Syntax
kml.point(long, lat, alt) kml.point(...,'PropertyName',PropertyValue,...)
Description
Places markers in the coordinates defined by the inputs longitude, latitude and altitude. Similar to built-in scatter function.
The units for latitude and longitude are normally given in degrees, but this can be changed by calling: kml.useDegrees; or kml.useRadians; before plotting. Altitude is always given in meters.
For a list of available markers, run: help kml.parseIconURL
It is possible to fine tune the point properties using name-value pairs:
kml.point(...,'PropertyName',PropertyValue,...)
Properties
Property Name | Type | Description |
---|---|---|
'name' | string | Name of the point inside the kml file |
'id' | string | Internal id of this point inside the kml |
'description' | string | A short description of what the point represents |
'visibility' | true/false | Control the initial visibility of the point |
'iconColor' | kml color string | Defines the color of the markers. Must be a valid hex color string input, in the style AABBGGRR |
'iconScale' | double | Defines the size of each marker. Can be one input for all markers, or an array with the same size as Latitude and Longitude, with the size of each marker |
'iconURL' | string | Selects which type of marker will be used. A list of available markers can be seen by running help kml.parseIconURL |
'labelScale' | double | Defines the size of the text. Can be one input for all markers, or an array with the same size as Latitude and Longitude, with the size of each marker |
'altitude' | double | Altitude where each marker will be placed. Can be one altitude for all, or an array with a value for each marker. Input in meters |
'altitudeMode' | string | Choose if the altitude value is absolute to the earth model, relative to the ground level, or should be clamped to the ground. Valid inputs: 'absolute', 'relativeToGround', 'clampToGround' |
'timeStamp' | kml date string | Associates the point to a moment in time. Should not be used together with timeSpan. Should be a string in the XML time format (more information available here) |
'timeSpanBegin' | kml date string | Defines the moment in time where the point starts to exist. Should not be used together with timeStamp. Should be a string in the XML time format (more information available here) |
'timeSpanEnd' | kml date string | Defines the moment in time where the point finishes to exist. Should not be used together with timeStamp. Should be a string in the XML time format (more information available here) |
Example
% Create a new kml object k = kml('my kml file'); % Create some random points in the kml using a white star as marker k.point(rand(100,1)*360-180,rand(100,1)*180-90,ones(100,1)*1e6,'iconURL','wht-stars','iconScale',10); % Save the kml and open it in Google Earth k.run;
This is the result of running this example:

This file is part of the kml toolbox. Copyright 2012 Rafael Fernandes de Oliveira (rafael@rafael.aero)