TimePrimitives

TimeSpan

class simplekml.TimeSpan(begin=None, end=None)

Represents an extent in time bounded by begin and end dates.

The arguments are the same as the properties.

Usage:

import simplekml
kml = simplekml.Kml()
pnt = kml.newpoint(name='A Point')
pnt.timespan.begin = "2011-02-20"
pnt.timespan.end = "2012-07-31"
kml.save("TimeStamp.kml")
begin

The starting time, accepts string.

end

The ending time, accepts string.

GxTimeSpan

class simplekml.GxTimeSpan(**kwargs)

A copy of the simplekml.TimeSpan element, in the extension namespace.

Args:

Usage:

import simplekml
kml = simplekml.Kml()
ls = kml.newlinestring(name='A LineString')
ls.coords = [(18.333868,-34.038274,10.0), (18.370618,-34.034421,10.0)]
ls.extrude = 1
ls.altitudemode = simplekml.AltitudeMode.relativetoground
ls.lookat.gxaltitudemode = simplekml.GxAltitudeMode.relativetoseafloor
ls.lookat.latitude = -34.028242
ls.lookat.longitude = 18.356852
ls.lookat.range = 3000
ls.lookat.heading = 56
ls.lookat.tilt = 78
ls.lookat.gxtimespan.begin = "2011-02-20"
ls.lookat.gxtimespan.end = "2012-07-31"
kml.save("GxTimeSpan.kml")
begin

The starting time, accepts string.

end

The ending time, accepts string.

id

The id string.

TimeStamp

class simplekml.TimeStamp(when=None)

Represents a single moment in time.

The arguments are the same as the properties.

Usage:

import simplekml
kml = simplekml.Kml()
pnt = kml.newpoint(name='A Point')
pnt.timestamp.when = 2011
kml.save("TimeStamp.kml")
when

A moment in time, accepts string.

GxTimeStamp

class simplekml.GxTimeStamp(**kwargs)

A copy of the simplekml.TimeStamp element, in the extension namespace.

Args:

Usage:

import simplekml
kml = simplekml.Kml()
ls = kml.newlinestring(name='A LineString')
ls.coords = [(18.333868,-34.038274,10.0), (18.370618,-34.034421,10.0)]
ls.extrude = 1
ls.altitudemode = simplekml.AltitudeMode.relativetoground
ls.lookat.gxaltitudemode = simplekml.GxAltitudeMode.relativetoseafloor
ls.lookat.latitude = -34.028242
ls.lookat.longitude = 18.356852
ls.lookat.range = 3000
ls.lookat.heading = 56
ls.lookat.tilt = 78
ls.lookat.gxtimestamp.when = 2011
kml.save("GxTimeStamp.kml")
id

The id string.

when

A moment in time, accepts string.