/usr/share/doc/gmt/html/man/gshhg.html is in gmt-doc 4.5.12-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | <!-- Creator : groff version 1.22.2 -->
<!-- CreationDate: Thu Feb 27 18:14:19 2014 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>GSHHG</title>
</head>
<body bgcolor="#ffffff">
<h1 align="center">GSHHG</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#TECHNICAL INFORMATION">TECHNICAL INFORMATION</a><br>
<a href="#REFERENCES">REFERENCES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">gshhg −
Extract ASCII listings from binary GSHHG data files</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>gshhg</b>
<i>binaryfile.b</i> [ <b>−A</b><i>area</i> ] [
<b>−G</b> ] [ <b>−I</b><i>id</i> ] [
<b>−L</b> ] [ <b>−M</b> ] [
<b>−N</b><i>level</i> ] [ <b>−Qe</b>|<b>i</b> ]
> <i>asciifile.txt</i></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i><b>gshhg</b></i>
reads the binary coastline (GSHHS) or political boundary or
river (WDBII) files and extracts an ASCII listing. It
automatically handles byte-swabbing between different
architectures. Optionally, only segment header info can be
displayed. The output header information has the format
<i>ID npoints hierarchical-level source area f_area west
east south north container ancestor</i>, where hierarchical
levels for coastline polygons go from 1 (shoreline) to 4
(lake inside island inside lake inside land). Source is
either W (World Vector Shoreline) or C (CIA World Data Bank
II); lower case is used if a lake is a river-lake (a portion
of a river that is so wide it is better represented by a
closed polygon). The <i>west east south north</i> is the
enclosing rectangle, <i>area</i> is the polygon area in km^2
while f_area is the actual area of the ancestor polygon (at
full resolution), <i>container</i> is the ID of the polygon
that contains this polygon (-1 if none), and <i>ancestor</i>
is the ID of the polygon in the full resolution set that was
reduced to yield this polygon (-1 if full resolution since
there is no ancestor). For river and border data the header
is simply <i>ID npoints hierarchical-level source west east
south north</i>. For more information about the file
formats, see TECHNICAL INFORMATION below. <i><br>
binaryfile.b</i></p>
<p style="margin-left:22%;">GSHHS or WDBII binary data file
as distributed with the GSHHS data supplement. Any of the 5
standard resolutions (full, high, intermediate, low, crude)
can be used.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−A</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Only output polygons whose area equals or exceeds the
<i>area</i> value in km^2 [Default outputs all
polygons].</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−G</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Write output that can be imported into GNU Octave or
Matlab by ending each segment with a NaN-record.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−I</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Only output information for the polygon that matches
<i>id</i>. Use <b>−Ic</b> to get all the continents
only [Default outputs all polygons].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−L</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Only output a listing of polygon or line segment headers
[Default outputs headers and data records].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−M</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Start all header records with the GMT multiple segment
indicator ’>’ [Default uses P for polygons
and L for lines].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−N</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Only output features whose level matches the given
<i>level</i> [Default will output all levels].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−Q</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Control what to do with river-lakes (river sections
large enough to be stored as closed polygons). Use
<b>−Qe</b> to exclude them and <b>−Qi</b> to
exclude everything else instead [Default outputs all
polygons].</p> </td></tr>
</table>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">To convert the
entire intermediate GSHHS binary data to ASCII files for
Octave/Mathlab, run</p>
<p style="margin-left:11%; margin-top: 1em">gshhg gshhs_i.b
-G > gshhs_i.txt</p>
<p style="margin-left:11%; margin-top: 1em">To only get a
listing of the headers for the river data set at full
resolution, try</p>
<p style="margin-left:11%; margin-top: 1em">gshhg
wdb_rivers_f.b -L > riverlisting.txt</p>
<p style="margin-left:11%; margin-top: 1em">To only extract
lakes, excluding river-lakes, from the high resolution file,
try</p>
<p style="margin-left:11%; margin-top: 1em">gshhg gshhs_h.b
-Ee -N2 > all_lakes.txt</p>
<h2>TECHNICAL INFORMATION
<a name="TECHNICAL INFORMATION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Users who wish
to access the GSHHG (GSHHS and WDBII) data directly from
their custom programs should consult the gshhg.c and gshhg.h
source code and familiarize themselves with the data format
and how various information flags are packed into a single
4-byte integer. While we do not maintain any Octave/Matlab
code to read these files we are aware that both Mathworks
and IDL have made such tools available to their users.
However, they tend not to update their code and our file
structure has evolved considerably over time, breaking their
code. Here, some general technical comments on the binary
data files are given. <b><br>
GSHHS</b>: These files contain completely closed polygons of
continents and islands (level 1), lakes (level 2),
islands-in-lakes (level 3) and ponds-in-islands-in-lakes
(level 4); a particular level can be extracted using the
<b>−N</b> option. Continents are identified as the
first 6 polygons and can be extracted via the
<b>−Ic</b> option. The IDs for the continents are
Eurasia (0), Africa (1), North America (2), South America
(3), Antarctica (4), and Australia (5). Files are sorted on
area from large to small. There are two sub-groups for level
2: Regular lakes and the so-called "river-lakes",
the latter being sections of a river that are so wide to
warrant a polygon representation. These river-lakes are
flagged in the header (also see <b>−Q</b>). All five
resolutions are free of self-intersections. Areas of all
features have been computed using a Lambert azimuthal
equal-area projection centered on the polygon centroids,
using WGS-84 as the ellipsoid. GMT use the GSHHS as a
starting point but then partition the polygons into pieces
using a resolution-dependent binning system; parts of the
world are then rebuilt into closed polygons on the fly as
needed. For more information on GSHHS processing, see Wessel
and Smith (1996). <b><br>
WDBII</b>. These files contain sets of line segments not
necessarily in any particular order. Thus, it is not
possible to extract information pertaining to just one river
or one country. Furthermore, the 4 lower resolutions derive
directly from the full resolution by application of the
Douglas-Peucker algorithm (see gshhg_dp), hence
self-intersections are increasingly likely as the resolution
is degraded. Note that the river-lakes included in GSHHS are
also duplicated in the WDBII river files so that each data
set can be a stand-alone representation. Users who wish to
access both data sets can recognize the river-lakes features
by examining the header structure (see the source code for
details); they are also the only closed polygons in the
WDBII river file. There are many levels (classes) in the
river file: River-lakes (0), Permanent major rivers (1),
Additional major rivers (2), Additional rivers (3), Minor
rivers (4), Intermittent rivers -- major (6), Intermittent
rivers -- additional (7), Intermittent rivers -- minor (8),
Major canals (10), Canals of lesser importance (11), and
Canals -- irrigation type (12). For the border file there
are three levels: National boundaries (1), Internal domestic
boundaries (2), and international maritime boundaries (3).
Individual levels or classes may be extracted via
<b>−N</b>.</p>
<h2>REFERENCES
<a name="REFERENCES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Douglas, D. H.,
and T. K. Peucker, 1973, Algorithms for the reduction of the
number of points required to represent a digitized line of
its caricature, <i>Can. Cartogr., 10</i>, 112-122. <br>
Gorny, A. J., 1977, <i>World Data Bank II General User
GuideRep. PB 271869</i>, 10pp, Central Intelligence Agency,
Washington, DC. <br>
Soluri, E. A., and V. A. Woodson, 1990, World Vector
Shoreline, <i>Int. Hydrograph. Rev., LXVII(1)</i>, 27-35.
<br>
Wessel, P., and W. H. F. Smith, 1996, A global,
self-consistent, hierarchical, high-resolution shoreline
database, <i>J. Geophys. Res., 101(B4)</i>, 8741-8743.</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i><A HREF="GMT.html">GMT</A></i>(1),
<i><A HREF="gshhg_dp.html">gshhg_dp</A></i>(1) <i><A HREF="gshhgtograss.html">gshhgtograss</A></i>(1)</p>
<hr>
</body>
</html>
|