obspy.io.kml.core.catalog_to_kml_string
- catalog_to_kml_string(catalog, icon_url='https://maps.google.com/mapfiles/kml/shapes/earthquake.png', label_func=None, icon_size_func=None, encoding='UTF-8', timestamps=True)[source]
Convert a
Catalog
to a KML string representation.- Parameters:
catalog (
Catalog
) – Input catalog data.icon_url (str) – Internet URL of icon to use for events (e.g. PNG image).
encoding (str) – Encoding used for XML string.
timestamps (bool) – Whether to add timestamp information to the event elements in the KML or not. If timestamps 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 catalog in time can be visualized. If timespans are not used, any event happening at any point in time is always shown.
- Return type:
- Returns:
Encoded byte string containing KML information of the event metadata.