Focal Point Non-River Jobsheets

Extension Area

Purpose:

This exercise enables the extension area for a flash flood warning which allows polygons to exist over marine areas in order to avoid problems with complex coastlines and 20 point vertices limit. WarnGen allows for an extensionArea distance (mi) to which polygons extend beyond the coastline and an extensionArea simplification tolerance which is the minimum distance apart between two vertices. Hazard Services allows the focal point to configure the extension distance and simplification tolerance using HazardTypesUtils.py.

Tasks:

  1. For more background on WarnGen coastal extension areas see the WarnGen VLab documentation site.
  2. In the Localization Perspective, navigate to your site's WarnGen's geospatialConfig_COUNTY.xml file under D2D -> WarnGen -> geospatialConfig_COUNTY.xml -> SITE and double click on SITE to load.
    To identify any extension area settings in your WarnGen configuration, click in the geospatialConfig_COUNTY.xml file. Then use Ctrl+F to launch the Find/Replace tool and search for extensionArea in the file. 
    Note: In the image above the distance="1.5" says to allow the polygon to extend 1.5 miles from the edge of the coastline, and the 1.5 mile simplification says to require a minimum distance of 1.5 miles between any two vertices.
  3. In the Inclusion Area jobsheet, we looked at HazardTypes.py for the inclusion* tags. In this file, for any specific hazard such as FF.W.Convective, you will also see a single tag called "extensionTuple" which looks like: 
    'extensionTuple': HazardTypesUtils().countyExtension(),
  4. (no action in this step) Based on this line, we will need to access HazardTypesUtils.py in order to create a class override for the countyExtension method and implement an extension area. HazardTypesUtils.py is also located in the Hazard Types folder of Hazard Services with HazardTypes.py.
  5. If you do not have a USER override file for HazardTypesUtils.py then right click on BASE -> Create Override File ... and select User. Open the BASE version for reference and take a look at the defined methods available in this class. 
  6. From the BASE version of HazardTypesUtils.py, copy and paste the following lines into your USER override for HazardTypesUtils.py, below the line with "class", being sure to keep correct indentation:
        def countyExtension(self):
            return None
  7. As mentioned in the documentation in the base file, rather than returning "None" we can implement what is called a tuple, which is just an ordered collection of objects, to define the desired extension area and simplification tolerance for the polygon. Where you see the word "None", change this to "(5, 1)", so the code in your user override should look something like this (note: the "pass" can be different in your file): 
    class HazardTypesUtils:
        def countyExtension(self):
            return (5,1)
    1. [INFO] This sets the extension distance, or the amount of space as a buffer around the coastline, to 5 miles, and the simplification tolerance to 1.
  8. Use Ctrl+S to save the file. Note if this is the first time you save an override you need to merge the changes and close the merge tab (see step 7 of the inclusion area jobsheet).
  9. Before testing, you will need to close Hazard Services and restart it
  10. In D2D, use the Hazard Services drawing tools to issue an FF.W.Convective flash flood over a marine area far beyond any extensionArea distance you created in WarnGen and notice the appearance of the polygon and the HID, initially.
  11. Select the Update Hazard Hatched Area checkbox to see how the extension area limit is applied. You can see that the polygon area is reduced to just the 5 mile buffer around the coastline. 
    1. NOTE: This behavior will occur for any Hazard Type, not just FF.W.Convective.
  12. For comparison purposes, here is what WarnGen does with a 1.5 mile distance and 1.5 mile simplification. Note the polygon snaps to within 1.5 miles of the coastline and all vertices are greater than 1.5 miles apart.

  13. So in summary, we created an override of HazardTypesUtils.py to define an extension distance and simplification tolerance in the form of a tuple. This change can be viewed by creating a polygon over a marine area, and in the HID, choosing the option for "Update Hazard Hatched Area" to see the distance buffer applied.