Coder Social home page Coder Social logo

hazus-map-generator's Introduction

hazus-map-generator

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.

HAZUS Map Generator

Status

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.

Dependencies

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

Getting Started

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.

To Do

  • 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

hazus-map-generator's People

Contributors

joshgroeneveld avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

toddb8632

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.