iwfm.gis.shp_get_writer

iwfm.gis.shp_get_writer(outfile, type)[source]

Get a writer for a shapefile of the same type as the input shapefile.

Parameters:
  • outfile (str) – ouput shapefile name

  • type (str) – shapefile type

Returns:

w – The caller MUST call w.close() (or use it as a context manager) for the shapefile to be flushed to disk.

Return type:

shapefile.Writer