shakemap.coremods.mapping

class shakemap.coremods.mapping.MappingModule(eventid)[source]

Bases: CoreModule

mapping – Generate maps of the IMTs found in shake_result.hdf.

Instantiate a CoreModule class with an event ID.

command_name = 'mapping'
targets = ['products/intensity\\.jpg', 'products/intensity\\.pdf', 'products/mmi_legend\\.pdf', 'products/pga\\.jpg', 'products/pga\\.pdf', 'products/pgv\\.jpg', 'products/pgv\\.pdf', 'products/psa.*p.*\\.jpg', 'products/psa.*p.*\\.pdf']
dependencies = [('products/shake_result.hdf', True)]
configs = ['products.conf']
display_magnitude = None
parseArgs(arglist)[source]

Set up the object to accept the –display-magnitude flag

execute()[source]
Raises:
shakemap.coremods.mapping.make_map(adict)[source]
shakemap.coremods.mapping.make_pin_thumbnail(adict)[source]

Make the artsy-thumbnail for the pin on the USGS webpages.

shakemap.coremods.mapping.get_text_strings(stringfile)[source]

Read the file containing the translated text strings, remove the comments and parse as JSON.

Parameters:

stringfile (str) – Path to the map_strings.xx file specified in the config. The file is assumend to be UTF-8.

Returns:

A dictionary of strings for use in writing text to the maps.

Return type:

dict

shakemap.coremods.mapping.make_overlay(adict)[source]

Make a transparent PNG of intensity and a world file

Parameters:

adict (dict) – The usual dictionary for the mapping functions.

Returns:

Nothing.

Return type:

nothing