1GSHHS(1) Generic Mapping Tools GSHHS(1)
2
3
4
6 gshhs - Extract ASCII listings from binary GSHHS or WDBII data files
7
9 gshhs binaryfile.b [ -Iid ] [ -L ] [ -M ] > asciifile.txt
10
12 gshhs reads the binary coastline (GSHHS) or political boundary or river
13 (WDBII) files and extracts an ASCII listing. It automatically handles
14 byte-swabbing between different architectures. Optionally, only seg‐
15 ment header info can be displayed. The header info has the format ID
16 npoints hierarchical-level source area f_area west east south north
17 container ancestor, where hierarchical levels for coastline polygons go
18 from 1 (shoreline) to 4 (lake inside island inside lake inside land).
19 Source is either W (World Vector Shoreline) or C (CIA World Data Bank
20 II); lower case is used if a lake is a river-lake. The west east south
21 north is the enclosing rectangle, area is the polygon area in km^2
22 while f_area is the actual area of the ancestor polygon, container is
23 the ID of the polygon that contains this polygon (-1 if none), and
24 ancestor is the ID of the polygon in the full resolution set that was
25 reduced to yield this polygon (-1 if full resolution). For line data
26 the header is simply ID npoints hierarchical-level source west east
27 south north
28
29 binaryfile.b
30 GSHHS or WDBII binary data file as distributed with the GSHHS
31 data supplement. Any of the 5 standard resolutions (full, high,
32 intermediate, low, crude) can be used.
33
34 -I Only output information for the polygon that matches id [default
35 outputs all polygons].
36
37 -L Only output a listing of polygon or line segment headers
38 [default outputs headers and data records].
39
40 -M Start all header records with the GMT multiple segment indicator
41 '>' [Default uses P for polygons and L for lines].
42
44 To convert the entire intermediate GSHHS binary data to ASCII, run
45
46 gshhs gshhs_i.b > gshhs_i.txt
47
48 To only get a listing of the headers for the river data set at full
49 resolution, try
50
51 gshhs wdb_rivers_f.b -L > riverlisting.txt
52
54 While the GSHHS data is organized as a set of closed polygons, the
55 rivers and boundary data are just a set of line segments in no particu‐
56 lar order. Thus, it is not possible to extract information pertaining
57 to just one river or one country.
58
60 GMT(1), gshhs_dp(1) gshhstograss(1)
61
62
63
64GMT 4.5.6 10 Mar 2011 GSHHS(1)