Mapping Toolbox | ![]() ![]() |
Global Self-Consistent Hierarchical High-Resolution Shoreline
Another source of high-resolution coastline data is the Global Self-consistent Hierarchical High-resolution Shoreline (GSHHS). The GSHHS contains coastlines, major rivers, and lakes for the entire globe. The data requires 85 megabytes of storage at full resolution, but four successively lower resolution versions are also available. The GSHHS was developed by Paul Wessel of the University of Hawaii and Walter H. F. Smith of the NOAA Geosciences. The sources of data were the CIA World Data Bank II, designed for a scale of about 1:2,000,000, and the NOAA World Vector Shoreline, which is at a scale of 1:250,000.
The GSHHS data in the various resolutions is available over the Internet from <ftp://ftp.ngdc.noaa.gov/MGG/shorelines>
. These are binary files compressed using gzip. You should download the files in binary mode and decompress them. No byte swapping or line ending conversion is needed.
You can read any of the GSHHS data files with the gshhs
function. GSHHS files have filenames of the form 'gshhs_X.b
', where X
is one of the letters c
, l
, i
, h
, and f
, corresponding to increasing resolution (and file size).
Read the entire crude resolution version and display it.
The higher resolution versions of the data are better suited for maps covering smaller regions. Here is a comparison of the other four data files. Before extracting the data, be sure to create an index file using the 'createindex
' option. This option writes a file that allows gshhs
to read much faster. You only need to do this once.
latlim = [41.13 42.75]; lonlim = [-71.7 -69.8]; figure subplot('position',[.01 .51 .48 .48]) axesm('mercator','MapLatLimit',latlim,'MapLonLimit',lonlim,... 'Frame','on') gshhs('gshhs_l.b','createindex') s = gshhs('gshhs_l.b',latlim,lonlim); displaym(s); tightmap subplot('position',[.51 .51 .48 .48]) axesm('mercator','MapLatLimit',latlim,'MapLonLimit',lonlim,... 'Frame','on') gshhs('gshhs_i.b','createindex') s = gshhs('gshhs_i.b',latlim,lonlim); displaym(s); tightmap subplot('position',[.01 .01 .48 .48]) axesm('mercator','MapLatLimit',latlim,'MapLonLimit',lonlim,... 'Frame','on') gshhs('gshhs_h.b','createindex') s = gshhs('gshhs_h.b',latlim,lonlim); displaym(s); tightmap subplot('position',[.51 .01 .48 .48]) axesm('mercator','MapLatLimit',latlim,'MapLonLimit',lonlim,.... 'Frame','on') gshhs('gshhs_f.b','createindex') s = gshhs('gshhs_f.b',latlim,lonlim); displaym(s); tightmap
The data is returned as geographic data structure of filled patches with the tags 'land
', 'lake
', 'island
' for an island in a lake, or 'pond
' for a pond on an island in a lake. The full resolution version displays the continent as a line rather than as a filled patch, because of the memory required to trim a polygon with more than a million points. The high resolution version is virtually indistinguishable in shape from the full version and requires only 20 megabytes to store.
![]() | Global Vector Data | USGS On-Line Coastline Extractor | ![]() |