The HAZUS Map Generator creates a series of up to nine maps to show results from a HAZUS earthquake analysis. HAZUS is a GIS-based disaster loss estimation software from the Federal Emergency Management Agency. HAZUS can estimate losses from earthquakes, floods and hurricanes.
This tool is a simple app made with wxPython to automate the creation of a standard set of maps based on this SOP. The SOP lists twelve different maps, but the HAZUS Map Generator only creates those maps based on data from the HAZUS output.
This tool has only been tested against HAZUS 2.2 SP1, ArcGIS 10.2.2 and Windows 7. One of the goals in the near future is to update this tool to work with the newly released HAZUS 3.0.
You will need the following Python modules for this tool to run properly:
- wx (3.0.3)
- arcpy (Distributed with each ArcGIS installation)
- pyodbc (3.0.7)
- pythonnet (2.0.0)
- os
- sys
- inspect
- shutil
- traceback
- logging
This tool assumes that you already have a HAZUS study region and that you've already completed the HAZUS analysis. This tool is only designed to automate the creation of maps following the analysis -- it can't run the analysis automatically.
Once you have all of the dependencies loaded, download a copy of the repo to your machine. The repo includes a set of template maps and layer files that you can use or modify to fit your needs.
The script uses pyodbc to establish a connection to the HAZUS database -- a SQL Server instance that usually ends in ..//HAZUSPLUSSRVR. The HAZUS database can be on your local machine, or another machine on your network as long as the computer running the script can access the remote machine.
The script goes through each of the selected maps and executes a SQL query against the HAZUS database to return the information needed for the map. It then uses an arcpy UpdateCursor to populate the relevant data layers with the information from the SQL query.
Using the arcpy.mapping module, the script zooms to the extent of the study region and then exports the map as both a JPEG and PDF.
- Update to work with HAZUS 3.0
- Make the logger information more useful
- Connect the Reset button with a function that resets the selections and drop-downs before running the script