USGS - science for a changing world

HydroSHEDS


Data formats

6.1 File name syntax

  HydroSHEDS provides data in various regional extents, types, and resolutions. Information about the content is provided in the file names which follow the naming convention “Extent_DataType_Resolution”.

6.1.1 Regional extent

  To facilitate electronic distribution, all raster data at 3 arc-second resolution have been divided into five-degree by five-degree tiles. For example, the area of South America is covered by 103 individual tiles. The tile names are defined by a 7-digit identifier which refers to the latitude and longitude of the lower-left (southwest) corner of the tile. For example, the coordinates of the lower-left corner of tile s15w065 are 15 degrees south latitude and 65 degrees west longitude.

  File names of layers with continental extent are defined by a two-digit identifier:

IdentifierContinent
AfAfrica
As Asia
Au Australasia
Eu Europe
Na North America
Sa South America


6.1.2 Data type

Identifier Type of data
DEM Digital elevation model (void-filled)
CON Hydrologically conditioned elevation
DIR Drainage directions
ACC Flow accumulation (number of cells)
RIV River network (stream lines)
BAS Drainage basins (watershed boundaries)


6.1.3 Resolution

Identifierin sec/min in degree in meters/km
3s 3 arc-second 0.0008333333333333 approx. 90 m at the equator
15s 15 arc-second 0.0041666666666667 approx. 500 m at the equator
30s 30 arc-second 0.0083333333333333 approx. 1 km at the equator
5m 5 minute 0.0833333333333333 approx. 10 km at the equator


  Please note that all data provided in five-degree by five-degree tiles is in 3 arc-second resolution. However, the extension “3s” is omitted in order to shorten the file names.

6.2 Data Formats

6.2.1 Vector data format – ESRI Shapefile format

  The vector data sets distributed with HydroSHEDS, i.e. river lines (RIV) and basin polygons (BAS), are being made available in ESRI Shapefile format (ESRI 1998). A HydroSHEDS shapefile typically consists of five main files (.dbf, .sbn, .sbx, .shp, .shx). Additionally, basic metadata information is provided both in XML format (.xml) and in HTML format (.htm) following the FGDC standard. Projection information is provided in an ASCII text file (.prj). All shapefiles are in geographic (latitude/longitude) projection, referenced to datum WGS84.

6.2.2 Raster data formats

  The raster data layers distributed with HydroSHEDS, i.e. the void-filled elevation model (DEM), the hydrologically conditioned elevation model (CON), drainage directions (DIR), and flow accumulation (ACC), are being made available in two different formats: (a) in ESRI Grid format, and (b) as binary raster image in ESRI Band Interleaved by Line (BIL) format. The simple BIL format should allow for easy ingest into most popular image processing and geographic information systems packages. Further information on the contents of the raster files is provided below.

(a) ESRI Grid format

  The ESRI Grid format is supported by the ESRI GIS software environment, but it can also be imported into various independent GIS packages. Each raster coverage is provided in a root folder (named after the raster layer) which contains two subfolders: the grid data folder (again named after the raster layer) and a corresponding “info” folder. In the grid folder, basic metadata information is provided both in XML format (.xml) and in HTML format (.htm) following the FGDC standard. Projection information is provided in an ASCII text file (prj.adf). All raster data are in geographic (latitude/longitude) projection, referenced to datum WGS84.

  Note that it is not possible to store two or more grids in the same root folder by simply copying the according grid folders and merging the content of the “info” folders into one. To store multiple grids in one root folder, the grids have to be copied or moved from within an ESRI compatible software application.

(b) ESRI BIL format

  Each raster image is provided as four main files, with the extension of each file defining the file type (see table below). Additionally, basic metadata information is provided both in XML format (.xml) and in HTML format (.htm) following the FGDC standard. Projection information is provided in an ASCII text file (.prj). All raster data are in geographic (latitude/longitude) projection, referenced to datum WGS84.

Extension File type
.bil Raster data file
.hdr Header file
.blw World file
.stx Statistics file


Raster data file (.bil)

  The raster data for each layer are provided as unsigned integer data in a simple binary raster format (either 8-bit, 16-bit, or 32-bit). There are no header or trailer bytes embedded in the image. The data are stored in row major order (all the data for row 1, followed by all the data for row 2, etc.).

Header file (.hdr)

  The raster data header file is an ASCII text file containing size and coordinate information for the layer. Many standard software packages require the header file to provide important geo-referencing information for the image. The following keywords are used in the header file:

BYTEORDER byte order in which image pixel values are storedI = Intel byte order (least significant byte first)
LAYOUT organization of the bands in the fileBIL = band interleaved by line
NROWS number of rows in the image
NCOLS number of columns in the image
NBANDS number of spectral bands in the image (1 for all raster layers)
NBITS number of bits per pixel (8, 16 or 32)
BANDROWBYTES number of bytes per band per row (twice the number of columns for the 16-bit image; four-times for the 32-bit image)
TOTALROWBYTES total number of bytes of data per row (twice the number of columns for the 16-bit image; four-times for the 32-bit image)
BANDGAPBYTES the number of bytes between bands in a BSQ format image (0 for all raster layers)
NODATA Value used for masking purposes (-9999 for all elevation images DEM and CON; -9 for all drainage direction maps DIR; 0 for all flow accumulation maps ACC)
ULXMAP longitude of the center of the upper-left pixel (decimal degrees)
ULYMAP latitude of the center of the upper-left pixel (decimal degrees)
XDIM x-dimension of a pixel in geographic units (decimal degrees)
YDIM y-dimension of a pixel in geographic units (decimal degrees)


World file (.blw)

  The world file is an ASCII text file containing coordinate information. It is used by some packages for geo-referencing of image data. The following parameters are provided in the world file:

XDIM x-dimension of a pixel in geographic units (decimal degrees)
Rotation term always zero
Rotation term always zero
Negative YDIM negative y-dimension of a pixel in geographic units (decimal degrees)
XMIN longitude of the center of the upper-left pixel (decimal degrees)
YMAX latitude of the center of the upper-left pixel (decimal degrees)


Statistics file (.stx)

  The statistics file is an ASCII text file which lists the band number, minimum value, maximum value, mean value, and standard deviation of the values in the raster data file.

Important note for using BIL files:

  Because the BIL image data (.bil) are stored in binary format, users must be aware of how the bytes are addressed on their computers. The data are provided in Intel byte order, which stores the least significant byte first (“little endeian”). Most PCs use the Intel byte order. However, systems such as Sun SPARC and Silicon Graphics workstations use the Motorola byte order, which stores the most significant byte first ("big endian"). Users with systems that address bytes in the Motorola byte order may have to "swap bytes" of the BIL data unless their application software performs the conversion during ingest. The statistics file (.stx) provided for each data set gives the range of values in the image file, so that users can check if they have the correct values stored on their system.

  Because the BIL images are provided in unsigned binary format, negative values are stored in reverse order starting at the top end of the possible value range for each data file. For example, HydroSHEDS drainage direction maps (DIR) are stored as unsigned 8-bit data, allowing for values between 0 and 255, and the value -1 is stored as 255, -2 is 254, etc. HydroSHEDS elevation layers (DEM and CON) are stored as unsigned 16-bit data, allowing for values between 0 and 65535. Also, ocean areas have been masked in HydroSHEDS, using NoData flags of -9999 (DEM and CON layers) and -9 (DIR layer). Many software applications cannot directly interpret these negative values. An easy fix can be accomplished by converting the original BIL image using a formula like the following (from ArcInfo):

For 8-bit data: out_grid = con(in_grid >= 128, in_grid - 256, in_grid)
For 16-bit data: out_grid = con(in_grid >= 32768, in_grid - 65536, in_grid)


  The converted grid will then have the negative values properly represented, and the statistics of the grid should match those listed in the .stx file. If desired, the -9999 or -9 ocean mask values in the grid can then be set to NoData. The HydroSHEDS flow accumulation maps (ACC), stored as unsigned 32-bit data, do not include negative values and the value 0 masks ocean areas.

6.3 Data distribution

  HydroSHEDS data is available electronically in compressed zip file format from the EROS Data Center at http://hydrosheds.cr.usgs.gov (at no cost). To use the data files, the zip files must first be decompressed. Each zip file includes a copy of the HydroSHEDS Technical Documentation. Multiple zip files that contain data in ESRI Shapefile or BIL format can be decompressed into one folder. Multiple zip files that contain data in ESRI Grid format are by default decompressed into separate subfolders. To store multiple grids in one root folder, the grids have to be copied or moved from within an ESRI compatible software application.

  Below are some estimates for file sizes of the compressed zip files. Decompressed, the various file sizes may exceed the zipped sizes by 10-fold and more.

Zipped file Estimated size range
Five-degree by five degree tiles 10-50 MB
Continental grids at 15s resolution 30-100 MB
Continental grids at 30s resolution 10-50 MB
Continental vector files 10-50 MB

Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://hydrosheds.cr.usgs.gov/data.php
Page Contact Information: webmapping@usgs.gov
Page Last Modified: January 29, 2019