Mapping Toolbox    
gshhs

Read the Global Self-consistent Hierarchical High-resolution Shoreline data

Syntax

Background

The Global Self-consistent Hierarchical High-resolution Shoreline was created by Paul Wessel of the University of Hawaii and Walter H. F. Smith of the NOAA Geosciences Lab. At the full resolution the data requires 85 Megabytes uncompressed, but lower resolution versions are also provided. This database includes coastlines, major rivers, and lakes.

Description

struc = gshhs(filename) reads the specified GSHHS file and extracts data for the entire world. The result is returned as a geographic data structure. Each element of struc represents a unique polygon. The tag field for each element contains the topographic level represented by the polygon, and will be either 'land', 'lake', 'island' for an island in a lake, or 'pond' for a pond on an island in a lake. GSHHS files have file names 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).

struc = gshhs(filename,latlim,lonlim) reads the data for the part of the world within the latitude and longitude limits. The limits must be two-element vectors in units of degrees. Longitude limits should be between [-180 195].

gshhs(filename,'createindex') creates an index file for faster reading. The index file has the same name the GSHHS data file, but with the extension `i', instead of `b'. The file is written in the present working directory, which can be identified with the command pwd. This file is needed for acceptable performance with the larger datasets. No map data is returned while creating the index.

Example

Read all of the lowest resolution database.

Read the intermediate resolution database for South America.

Read the full resolution file for East and West Falkland Islands (Islas Malvinas).

Create the index file for the high resolution database.

Limitations

Polygons with more than 1 million points are treated as line objects rather than patches. This occurs only for the full resolution file.

Remarks

The GSHHS data in various resolutions is available over the Internet from

ftp://ftp.ngdc.noaa.gov/MGG/shorelines

Information on the datasets is available from

http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html

If you are extracting data within smaller geographic limits, it is much faster to create the index file first, and then extract the data. With very large amounts of data, you may want to plot the data as NaN-clipped lines, rather than a very larger number of patches. Use extractm to combine the data into one vector.

See Also
extractm
Extracts vector data from geographic data structures
vmap0data
Extracts selected data from the Vector Map Level 0 CD-ROMs
dcwdata
Extracts selected data from the Digital Chart of the World
tgrline
TIGER/Line data extraction
tigermif
Reads the TIGER MIF thinned boundary file
tigerp
Reads the TIGER p and pa thinned boundary file (ArcInfo format)


  globedems gtopo30