shakemap.coremods.shape¶
- class shakemap.coremods.shape.ShapeModule(eventid)[source]¶
Bases:
CoreModule
shape – Generate shape files of the ground motion parameters
Instantiate a ShapeModule class with an event ID.
- command_name = 'shape'¶
- targets = ['products/shape\\.zip']¶
- dependencies = [('products/shake_result.hdf', True)]¶
- execute()[source]¶
Create shape files.
- Raises:
NotADirectoryError – When the event data directory does not exist.
FileNotFoundError – When the the shake_result HDF file does not exist.
- shakemap.coremods.shape.create_polygons(container, datadir, logger, max_workers, method='pcontour')[source]¶
Generates a set of closed polygons (with or without holes) using the specified method (either pcontour or skimage), and uses fiona to convert the resulting GeoJSON objects into ESRI-style shape files which are then zipped into an archive along with .prj, .lyr, and metadata .xml files. A warning will be emitted if .lyr, or .xml files cannot be found for the ground motion parameter in question.
- Parameters:
- Returns:
Nothing.
- Return type:
(nothing)