obspy.io.shapefile.core._write_shapefile

_write_shapefile(obj, filename, extra_fields=None, **kwargs)[source]

Write Inventory or Catalog object to a ESRI shapefile.

Parameters:
  • obj (Catalog or Inventory) ObsPy object for shapefile output
  • filename (str) Filename to write to. According to ESRI shapefile definition, multiple files with the following suffixes will be written: ”.shp”, ”.shx”, ”.dbj”, ”.prj”. If filename does not end with ”.shp”, it will be appended. Other files will be created with respective suffixes accordingly.
  • extra_fields (list) List of extra fields to write to the shapefile table. Each item in the list has to be specified as a tuple of: field name (i.e. name of database column, str), field type (single character as used by pyshp: 'C' for string fields, 'N' for integer/float fields - use precision None for integer fields, 'L' for boolean fields), field width (int), field precision (int) and field values (list of individual values, must have same length as given catalog object or as the sum of all station objects across all networks of a given inventory).