Various

Alias

class simplekml.Alias(targethref=None, sourcehref=None)

Contains a mapping from a sourcehref to a targethref.

The arguments are the same as the properties.

sourcehref

The source href, accepts string.

targethref

The target href, accepts string.

Box

class simplekml.Box(north=None, south=None, east=None, west=None)

Abstract class for box elements.

The arguments are the same as the properties.

Note

Not to be used directly.

east

Longitude of the east edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

north

Latitude of the north edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

south

Latitude of the south edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

west

Longitude of the west edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

HotSpot

class simplekml.HotSpot(**kwargs)

Specifies the position inside the [Icon] that is anchored to the [Point].

Arguments are the same as the properties.

x

Number in xunits, accepts int.

xunits

Type of x units, see [Units] for values.

y

Number in yunits, accepts int.

yunits

Type of y units, See simplekml.Units for values.

Icon

class simplekml.Icon(gxx=None, gxy=None, gxw=None, gxh=None, **kwargs)

Defines an image associated with an Icon style or overlay.

The arguments are the same as the properties.

Usage:

import simplekml
kml = simplekml.Kml()
pnt = kml.newpoint(name='A Point')
pnt.coords = [(1.0, 2.0)]
pnt.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png'
kml.save("Icon.kml")
gxh

Height of icon palette, accpets int.

gxw

Width of icon palette, accpets int.

gxx

x position of icon palette, accpets int.

gxy

y position of icon palette, accpets int.

href

Target url, accepts string.

httpquery

Extra information to append to the query string, accepts string.

id

The id string.

refreshinterval

Time between refreshed, accepts float.

refreshmode

Type of refresh, accepts string of simplekml.RefreshMode constants.

viewboundscale

Extent to request from server, accepts float.

viewformat

Format of the query string, accepts string.

viewrefreshmode

Camera specific refresh, accepts simplekml.ViewRefreshMode constants.

viewrefreshtime

Camera specific refresh time, accepts float.

ImagePyramid

class simplekml.ImagePyramid(titlesize=256, maxwidth=0, maxheight=0, gridorigin='lowerLeft')

A hierarchical set of images.

The arguments are the same as the properties.

gridorigin

Specifies where to begin numbering the tiles, accepts string.

maxheight

Height in pixels of the original image, accepts int.

maxwidth

Width in pixels of the original image, accepts int.

titlesize

Size of the tiles, in pixels, accepts int.

ItemIcon

class simplekml.ItemIcon(state=None, href=None)

con used in the List view that reflects the state of a Folder or Link fetch.

The arguments are the same as the properties.

Usage:

import simplekml
kml = simplekml.Kml()
pnt = kml.newpoint(name='A Point')
pnt.coords = [(1.0, 2.0)]
pnt.style.liststyle.itemicon.href = 'http://maps.google.com/mapfiles/kml/shapes/info.png'
kml.save('ItemIcon.kml')
href

URL of the image used in List View for Feature, accepts string.

state

Current state of the link, accepts string from simplekml.State constants.

GxLatLonQuad

class simplekml.GxLatLonQuad(coords=None)

Used for nonrectangular quadrilateral ground overlays.

The arguments are the same as the properties.

coords

Four corners of quad coordinates, accepts list of four tuples in the order lon, lat.

The coordinates must be specified in counter-clockwise order with the first coordinate corresponding to the lower-left corner of the overlayed image. eg. [(0, 1), (1,1), (1,0), (0,0)]

LatLonAltBox

class simplekml.LatLonAltBox(minaltitude=0, maxaltitude=0, altitudemode='clampToGround', **kwargs)

A bounding box that describes an area of interest defined by geographic coordinates and altitudes.

Args:
altitudemode

Specifies how the altitude for the Camera is interpreted.

Accepts simplkml.AltitudeMode constants.

east

Longitude of the east edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

maxaltitude

Maximum altitude in meters, accepts float.

minaltitude

Minimum altitude in meters, accepts float.

north

Latitude of the north edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

south

Latitude of the south edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

west

Longitude of the west edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

LatLonBox

class simplekml.LatLonBox(rotation=None, **kwargs)

Specifies where the top, bottom, right, and left sides of a bounding box for the ground overlay are aligned.

Args:
east

Longitude of the east edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

north

Latitude of the north edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

rotation

Rotation of the overlay about its center, in degrees.

Values can be 180, accepts float.

south

Latitude of the south edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

west

Longitude of the west edge of the bounding box, in decimal degrees from 0 to 90, accepts float.

Location

class simplekml.Location(longitude=None, latitude=None, altitude=0)

Specifies the exact coordinates of the Model’s origin.

The arguments are the same as the properties.

altitude

Height above the earth’s surface in meters, accepts float.

latitude

Decimal degree, accepts float.

longitude

Decimal degree, accepts float.

Lod

class simplekml.Lod(minlodpixels=0, maxlodpixels=-1, minfadeextent=0, maxfadeextent=0)

Level of Detail describes the size of the projected region.

The arguments are the same as the properties.

maxfadeextent

Maximum distance over which the geometry fades, accepts int.

maxlodpixels

Maximum limit of the visibility range, accepts int.

minfadeextent

Minumum distance over which the geometry fades, accepts int.

minlodpixels

Minimum limit of the visibility range, accepts int.

Orientation

class simplekml.Orientation(heading=0, tilt=0, roll=0)

Describes rotation of a 3D model’s coordinate system.

The arguments are the same as the properties.

heading

Rotation about the z axis, accepts float.

roll

Rotation about the y axis, accepts float.

tilt

Rotation about the x axis, accepts float.

OverlayXY

class simplekml.OverlayXY(**kwargs)

Point in overlay image that is mapped to screen coordinate simplekml.ScreenXY

Arguments are the same as the properties.

x

Number in xunits, accepts int.

xunits

Type of x units, see [Units] for values.

y

Number in yunits, accepts int.

yunits

Type of y units, See simplekml.Units for values.

Region

class simplekml.Region(latlonaltbox=None, lod=None)

Used for nonrectangular quadrilateral ground overlays.

The arguments are the same as the properties.

latlonaltbox

Bounding box that describes an area, accepts simplkml.LatLonAltBox

lod

Level of Detail, accepts simplkml.Lod

ResourceMap

class simplekml.ResourceMap(aliases=None)

Contains and specifies 0 or more [Alias] elements.

The arguments are the same as the properties.

aliases

A list of all the aliases, accepts a list of aliases

newalias(**kwargs)

Creates a new simplekml.Alias and attaches it to the simplekml.ResourceMap.

Args:

RotationXY

class simplekml.RotationXY(**kwargs)

Point relative to the screen about which the screen overlay is rotated.

Arguments are the same as the properties.

x

Number in xunits, accepts int.

xunits

Type of x units, see [Units] for values.

y

Number in yunits, accepts int.

yunits

Type of y units, See simplekml.Units for values.

Scale

class simplekml.Scale(x=1, y=1, z=1)

Scales a model along the x, y, and z axes in the model’s coordinate space.

The arguments are the same as the properties.

x

Scale in the x direction, accepts float.

y

Scale in the y direction, accepts float.

z

Scale in the z direction, accepts float.

ScreenXY

class simplekml.ScreenXY(**kwargs)

Point relative to the screen origin that the overlay image is mapped to.

Arguments are the same as the properties.

x

Number in xunits, accepts int.

xunits

Type of x units, see [Units] for values.

y

Number in yunits, accepts int.

yunits

Type of y units, See simplekml.Units for values.

Size

class simplekml.Size(**kwargs)

Specifies the size of the image for the screen overlay.

Arguments are the same as the properties.

x

Number in xunits, accepts int.

xunits

Type of x units, see [Units] for values.

y

Number in yunits, accepts int.

yunits

Type of y units, See simplekml.Units for values.

Snippet

class simplekml.Snippet(content='', maxlines=None)

A short description of the feature.

Arguments are the same as the properties.

content

The description to be used in the snippet, accepts string.

maxlines

Number of lines to display, accepts int.

ViewVolume

class simplekml.ViewVolume(leftfov=0, rightfov=0, bottomfov=0, topfov=0, near=0)

Defines how much of the current scene is visible.

The arguments are the same as the properties.

bottomfov

Angle, in degrees, accepts float.

leftfov

Angle, in degrees, accepts float.

near

Measurement of viewing direction from the camera, accepts float.

rightfov

Angle, in degrees, accepts float.

topfov

Angle, in degrees, accepts float.