obspy.io.kml.core.inventory_to_kml_string

inventory_to_kml_string(inventory, icon_url='https://maps.google.com/mapfiles/kml/shapes/triangle.png', icon_size=1.5, label_size=1.0, cmap='Paired', encoding='UTF-8', timespans=True, strip_far_future_end_times=True)[source]

Convert an Inventory to a KML string representation.

Parameters:
  • inventory (Inventory) Input station metadata.
  • icon_url (str) Internet URL of icon to use for station (e.g. PNG image).
  • icon_size (float) Icon size.
  • label_size (float) Label size.
  • encoding (str) Encoding used for XML string.
  • timespans (bool) Whether to add timespan information to the single station elements in the KML or not. If timespans are used, the displayed information in e.g. Google Earth will represent a snapshot in time, such that using the time slider different states of the inventory in time can be visualized. If timespans are not used, any station active at any point in time is always shown.
  • strip_far_future_end_times (bool) Leave out likely fictitious end times of stations (more than twenty years after current time). Far future end times may produce time sliders with bad overall time span in third party applications viewing the KML file.
Return type:

byte string

Returns:

Encoded byte string containing KML information of the station metadata.