HEC-HMS version 4.10 beta 7 was used to develop this guide.

Download the HEC-HMS project files here - Minimal GIS Files.zip 


In this guide you will learn how to manage the GIS files within an HEC-HMS project to reduce the project's size on disk. Keeping the project's size on disk smaller will help when sending a project to others for review and when archiving a project. The example watershed has a drainage area of 157 square miles. A 10-meter terrain model was used to delineate subbasin and reach elements and to create the 2000-meter grid used to apply gridded precipitation. The figure below shows the watershed subdivided into three subbasins and the 2000-meter grid overlaid on top of the watershed.
Example basin model

GIS Files

When using the HEC-HMS GIS tools for delineation, the program will save all intermediate GIS layers to a subdirectory in the project's "gis" folder. The program creates a folder using the same name as the basin model to store the GIS layers. The figure below shows the typical files generated when running through steps on the GIS menu. HEC-HMS uses default names when creating the GIS files. The same GIS file names are used for each basin model, but the files are saved to separate folders. 

  • The elevation.tif file is created when you select a terrain grid for the basin model. HEC-HMS creates a copy of the terrain grid and projects the terrain file into the basin model's projection.
  • The sinkfill.tif and sinklocs.tif files are created with running the Preprocess Sinks tool.
  • The demsd8.tif, flowdir.tif, and flowaccum.tif files are created when running the Preprocess Drainage tool.
  • The str_bin.tif and streams.tif files area created when running the Identify Streams tool.
  • The fromGIS.sqlite and toGIS.sqlite files are created when running the Delineate Elements tool.

GIS file created by the project when delineating subbasins and reaches
When looking at the main project directory, you should see a file with an extension of *.basin. This is the basin model file, or the file used to save all parameters for elements in a basin model. You will also see a file that has the same name as the basin model with an extension of *.sqlite. The sqlite file contains the geographic information of the basin model elements, including geographic coordinates for polygons and lines. The sqlite file also contains the grid cell information when using the Structured discretization method; including geographic information of grid cells and the distance from the grid cell to the subbasin outlet (required for the ModClark transform method). You can force the program to write out the grid information by selecting the *Structured discretization method, choosing a grid projection and cell size, and then selecting the GIS | Compute | Grid Cells menu option. By default, the program will compute the structured grid information at the beginning of a simulation if that information does not already exist. To compute all information needed by the structured discretization method, the demsd8.tif, flowdir.tif, and flowaccum.tif files need to be available in the basin model's "gis" folder.

When you create a copy of a basin model, the program will copy all the files in the basin model's "gis" folder, and the sqlite file too. If you do have a large terrain model (large file size), then you can imagine the file storage required when creating multiple copies of a basin model, which is often the case when calibrating to multiple events and creating different basin model alternatives. If you look at the example project's file directory and navigate to the …\Minimal GIS Files\gis\Delineation directory, you will see the total file size is 145 megabytes (mb). Again, this is for a 10-meter terrain model covering a 157 square mile watershed. Imagine the file sizes for a larger watershed.

The following tutorial shows different processing times and delineation results when using terrain files with different cell resolutions. The bottom line is that for delineating watersheds, a larger cell size, 30 meters and larger, can often provide similar delineation results to smaller cell sizes, 10 meters, when you burn in streams and imposed published delineation boundaries from the National Hydrography Dataset. Not only is processing time reduced with larger cell terrain models, but the amount of disk space required is reduced too. Comparing GIS Processing Run Times with Different Size Terrain Models and Computers

Explore the Example Project

You do not need to duplicate all the GIS files when copying the basin model. There are some project management steps you can follow to save disk space. In most projects, you only need one basin model that has all the GIS files. In many cases, basin models do not need the overhead of duplicating the files in the "gis" folder. Major reasons why you do need to maintain all GIS files include: you need to re-delineate subbasins and reaches, you need to change the name of subbasin elements and then the structured discretization needs to be updated, or you need to change the grid characteristics for the structured discretization method. Even though these actions would require all GIS files, you do not need to have all GIS file for all basin models. As the following steps illustrate, you only need one basin model that contains all GIS files.

  1. Open the example project. You will see three basin models, Apr1994, Delineation, and Sep2018. The Delineation basin model was the first basin model added to this project. The GIS tools were used to delineate subbasin and reach elements, elements were renamed, parameters were estimated, and the 2000-meter SHG structured discretization was computed. The total file size for the files in the "gis" folder for the Delineation basin model is 145 mb.
    Three basin models available in the example project
  2. Within HEC-HMS, the Apr1994 basin model was created by copying the Delineation basin model. HEC-HMS automatically created a folder named Apr1994 in the "gis" directory and copied all GIS layers.
  3. After closing the example project, all files were manually deleted in the …\Minimal GIS Files\gis\Apr1994 directory.
  4. I like to view the terrain in the basin model, but I do not like the overhead of keeping duplicate copies of a large terrain file in my project. Navigate to the …\Minimal GIS Files\gis\Apr1994 directory. You should see an elevation.tif file that is only 3.5 mb. This file was created by resampling the original 10-meter terrain to a 30-meter grid cell size (the 10-meter elevation.tif file size is 55.6 mb). I made sure to use a file name of elevation.tif when saving the file to the …\Minimal GIS Files\gis\Apr1994 directory for HEC-HMS to automatically load it when opening the basin model.
  5. Using File Explorer, navigate to the main project directory. You will see a file named gridcells.sqlite. The file was manually created by copying the Delineation.sqlite file and renaming it to GridCells.sqlite. This file is used as the reference for the 2000-meter SHG discretization.
  6. Open the example HEC-HMS project and open the Apr1994 basin model. If you click on one of the subbasins, you will see that the Discretization method has been changed to File Specified. Open the Discretization tab, you will see the GridCells.sqlite file is referenced as shown in the figure below. Also, you can see the discretization in the basin model map by checking the Discretization option in the Map Layer editor. 
    Selecting the GridCells.sqlite file in the file-specified discretization
  7. Within HEC-HMS, the Sep2018 basin model was created by copying the Apr1994 basin model. HEC-HMS automatically created a folder named Sep2018 in the "gis" directory and copied the elevation.tif file.
  8. Simulation runs have been configured using both the Apr1994 and Sep2018 basin models and gridded precipitation. You can run these simulation and view results. You could also turn on spatial results and view gridded results, like cumulative precipitation.

If you rename a subbasin element then the reference to the discretization in the GridCells.sqlite file will not be automatically updated. You would need to go to the Delineation basin model and make the same subbasin name change and rerun the Compute Grid Cells tool. Then you would need to close the program, delete the GridCells.sqlite file, create a copy of the Delineation.sqlite file, and then rename the copied file GridCells.sqlite. Or another option is to manually copy the demsd8.tif, flowdir.tif, and flowaccum.tif files to the appropriate "gis" folder, change the discretization method to Structured, and then rerun the Compute Grid Cells tool.

The total zipped file size for this project is 128 mb. If all GIS files would have been saved for the Apr1994 and Sept2018 basin models, then the total zipped file size would be 272 mb. A significant amount of disk space is saved when you manage the GIS files. As the HEC-HMS team continues to develop and expand the GIS capabilities, internal file management options will be provided so that you do not have manually make these edits. But if you do, you will save disk space and time waiting for files to upload or download when sending/receiving projects or when archiving projects.

The figure below shows the Map Layers editor for the Apr1994 basin model. Notice the list of layers includes the files that were deleted from the …\Minimal GIS Files\gis\Apr1994 directory. Since we deleted these files outside of HEC-HMS, the program is not tracking that they are not available to view in the basin model. For example, nothing will happen if you check the box to view the Sink Fill grid. You could close HEC-HMS and then use File Explorer to manually copy the files from the …\Minimal GIS Files\gis\Delineation directory to the …\Minimal GIS Files\gis\Apr1994 directory if you wanted to view these GIS layers in the Apr1994 basin model.

Missing map layers