4.4.3. KMLFileWriter

class pyprom.lib.kmlwriter.KMLFileWriter(outputFileName, documentName=None, features=[], noFeatureDescription=False)[source]

KMLFileWriter consumes a list of Location objects, or a Container, or a list of Locations and Containers and produces a KML Document which contains folders by location type.

__init__(outputFileName, documentName=None, features=[], noFeatureDescription=False)[source]
Parameters
__weakref__

list of weak references to the object (if defined)

_append_linker(linker)[source]

Append linker object to to this Object

Parameters

linkerLinker

_append_spotElevation_derivative(feature, feature_type)[source]

Appends a spotElevation derivative to this Object

Parameters
  • feature – location object

  • feature_type (str) – string representation of this object.

append(feature)[source]

Append feature, or in the case of containers, pass on to extend.

Parameters

feature – Location or Container

extend(features)[source]

Extend extends features onto this KMLFileWriter. This is intended for lists of locations, or location containers.

Parameters

features (list, pyprom.lib.containers.spot_elevation.SpotElevationContainer) – list of features, or container

generateDocument()[source]

Generates KML document of locations in this object.

Returns

kml Document

generateKML()[source]

Produces KML string of this Writer Object.

Returns

string representation of KML

write()[source]

Write KML data to file.