View source code of the function ge_cylinder() in the MATLAB editor
Google Earth toolbox contents

ge_cylinder

Visualization of vertical cylindrical objects on the Earth's surface.

Syntaxgo to top

kmlStr = ge_cylinder(X,Y,R,H)
kmlStr = ge_cylinder(X,Y,R,H,Parameter,Value)

Descriptiongo to top

kmlStr = ge_cylinder(X,Y,R,H)

Generates a kml character array used for visualizing a cylindrical object on the Earth's surface, the centerpoint of which is located at [X,Y]; its radius is equal to R and its height is equal to H.

kmlStr = ge_cylinder(X,Y,R,H,Parameter,Value)

In addition to the above, a number of options can be set regarding the appearance of the cylinder. Assigning values to the parameters can be accomplished by inclusion of an alternating sequence of parameters and their value. The table below provides an overview of the authorized options. The order in which the parameters are included does not matter. Please be aware that the options are case-sensitive. Examples are provided further down.

ParameterDescription
'description'A description of the object can be included using this parameter. Its value must be passed as a character array. Including a description will cause a text balloon to pop up from the map at the object's location. This balloon contains the character array included in 'description'.
'divisions'The top of the cylinder is basically a ge_circle(). Circles are plotted as adjacent triangles. The number of triangles to be used can be set using this parameter. The number of triangles is defined as (d+1)*2, in which 'd' is the value of the 'devisions' parameter. Default number is 8.
'lineColor'Line color specification, including transparency. Color value format must be passed as a character array according to the format string 'TTRRGGBB', with 'TT' representing transparency; 'RR', 'GG', and 'BB' representing red, green, and blue colors, respectively. Intensity values are denoted as two-digit hexadecimal numbers ranging from 00 to FF. For example, '80FF0000' is semi-transparent red and 'FF0000FF' is fully opaque blue.
'lineWidth'Line width specification. Must be passed as a 1x1 numerical array.
'msgToScreen'Defines whether verbose feedback is provided by the function when it is accessed and when it finishes. Default is false (which is equivalent to logical(0), but quicker).
'name'Character array with the name of the object.
'polyColor'Polygon color specification, including transparency. Color value format same as 'lineColor'.
'snippet'A short description of the feature. In Google Earth, this description is displayed in the Places panel under the name of the feature. If a Snippet is not supplied, the first two lines of the description are used
'timeSpanStart'See Dynamic visualization.
'timeSpanStop'See Dynamic visualization.
'visibility'Defines whether the object is visible. Must be passed as numerical value 1 or 0.

Remarksgo to top

Latitudes on the Southern hemisphere and longitudes on the Western hemisphere must be passed as negative values.

Some transformation may occur due to the projection.

Latitudes and longitudes should be passed in units of decimal degrees (also known as fractional degrees). Google Earth uses Simple Cylindrical projection (also known as Plate Carée) with a WGS84 datum. Altitudes are in meters.

Examplesgo to top

See the demo file demo_ge_cylinder for more details.

The code contained in the demo file will generate a KML file that will display as follows when viewed in Google Earth:

Note that the third cylinder is initially not visible in the Viewer.