Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

single page | use frames     summary     class     fields     routine details     file attributes

.\

cgkml_file__define.pro

Graphics, FileIO


This program creates a KML file that can be displayed with Google Earth. It implements some (not all) of the objects or elements allowed in KML files. For reference, see the Google KML Reference Documentation.

Examples

To create an image overlay object:

kml = Obj_New('cgKML_File', 'test.kml') overlay = Obj_New('cgKML_GroundOverlay', $ HREF='myimage.tif', $ LATLONBOX=[]) kml -> Add, overlay kml -> Save kml -> Destroy

Class description for cgKML_File

Inheritance

All ancestor classes: cgContainer IDL_OBJECT IDL_CONTAINER

Properties

Properties in cgContainer

Properties in cgKML_File

HINT get set init
FILENAME get set
_REF_EXTRA get set
LEVEL get

Fields

Fields in cgContainer

Fields in IDL_OBJECT

Fields in IDL_CONTAINER

Fields in cgKML_File

HINT ''
FILENAME ''
LEVEL 0L

Author information

Author

FANNING SOFTWARE CONSULTING:

David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Copyright

Copyright (c) 2012, Fanning Software Consulting, Inc.

History

Change History:

Written, 28 October 2012 by David W. Fanning.

Routines

result = cgKML_File::INIT( [filename] [, HINT=string])

The purpose of this method is to establish the name of a KML file that is to be written.

cgKML_File::Add, theObject

This method allows KML objects to be added to the KML file.

cgKML_File::Body, LUN=integer

This method writes the contents of each KML object included in the file to the file in a recursive way.

cgKML_File::Destroy

This method destroys the KML_File object.

cgKML_File::GetProperty [, FILENAME=string] [, HINT=string] [, LEVEL=integer], _REF_EXTRA=_REF_EXTRA

This method allows the user to obtain properties of the object.

cgKML_File::Head, LUN=integer

This method opens the <kml> element and writes it to the file.

cgKML_File::Save, /KMZ [, SupportFiles=string]

This method saves the KML file and writes it to disk.

cgKML_File::SetProperty [, FILENAME=string] [, HINT=string], _REF_EXTRA=_REF_EXTRA

This method allows the user to set properties of the object.

cgKML_File::Tail, LUN=integer

This method closes the <kml> element.

cgKML_File::CLEANUP

The purpose of this method is to destroy anything we created that may leak memory or need to be released from use.

cgKML_File__Define [, class]

The cgKML_FILE class definition module.

Routine details

top cgKML_File::INIT

result = cgKML_File::INIT( [filename] [, HINT=string])

The purpose of this method is to establish the name of a KML file that is to be written. Optionally, a hint attribute can be specified that indicated to Google Earth that is should switch to sky view or to another celestial body, such as Mars.

Parameters

filename in optional type=string

The name of the KML file to be created. The output file should have a file extension of *.kml.

Keywords

HINT in optional type=string

A hint attribute (http://simplekml.readthedocs.org/en/latest/kml.html). Hint attributes are used as a signal to Google Earth to switch to sky view or to another celestial body, such as Mars.

top cgKML_File::Add

cgKML_File::Add, theObject

This method allows KML objects to be added to the KML file.

Parameters

theObject in required type=object

Only objects of class cgKML_OBJECT can be added to a KML file object.

top cgKML_File::Body

cgKML_File::Body, LUN=integer

This method writes the contents of each KML object included in the file to the file in a recursive way.

Keywords

LUN in required type=integer

The logical unit number that the KML file is attached to.

top cgKML_File::Destroy

cgKML_File::Destroy

This method destroys the KML_File object.

top cgKML_File::GetProperty

cgKML_File::GetProperty [, FILENAME=string] [, HINT=string] [, LEVEL=integer], _REF_EXTRA=_REF_EXTRA

This method allows the user to obtain properties of the object.

Keywords

FILENAME out optional type=string

The name of the KML file being created.

HINT out optional type=string

The hint attribute that was input to the file via the INIT or SetProperty methods.

LEVEL out optional type=integer

The heirarchtical level of this object.

_REF_EXTRA

top cgKML_File::Head

cgKML_File::Head, LUN=integer

This method opens the <kml> element and writes it to the file.

Keywords

LUN in required type=integer

The logical unit number that the KML file is attached to.

top cgKML_File::Save

cgKML_File::Save, /KMZ [, SupportFiles=string]

This method saves the KML file and writes it to disk.

Keywords

KMZ in required type=boolean default=0

If this keyword is set, the KML file is zipped into a KMZ file. This functionality is only available if you have installed the Open Source 7-Zip compression program to 7z.exe correctly in cgKML2KMZ. If you don't understand, please don't set this keyword!

SupportFiles in optional type=string

A string array of files that should be included in the KMZ file along with the KML file. Will search for files, in not included.

top cgKML_File::SetProperty

cgKML_File::SetProperty [, FILENAME=string] [, HINT=string], _REF_EXTRA=_REF_EXTRA

This method allows the user to set properties of the object.

Keywords

FILENAME in optional type=string

The name of the KML file being created.

HINT in optional type=string

A hint attribute (http://simplekml.readthedocs.org/en/latest/kml.html). Hint attributes are used as a signal to Google Earth to switch to sky view or to another celestial body, such as Mars.

_REF_EXTRA

top cgKML_File::Tail

cgKML_File::Tail, LUN=integer

This method closes the <kml> element.

Keywords

LUN in required type=integer

The logical unit number that the KML file is attached to.

top cgKML_File::CLEANUP

cgKML_File::CLEANUP

The purpose of this method is to destroy anything we created that may leak memory or need to be released from use.

top cgKML_File__Define

cgKML_File__Define [, class]

The cgKML_FILE class definition module.

Parameters

class out optional type=structure

The class definition returned as a structure variable. Occassionally useful.

File attributes

Modification date: Fri Mar 27 11:07:36 2015
Lines: 380
Docformat: rst rst