gshhs (1) - Linux Manuals
gshhs: Extract ASCII listings from binary GSHHS or WDBII data files
NAMEgshhs - Extract ASCII listings from binary GSHHS or WDBII data files
SYNOPSISgshhs binaryfile.b [ -Iid ] [ -L ] [ -M ] > asciifile.txt
DESCRIPTIONgshhs 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 header info has the format ID npoints hierarchical-level source area f_area west east south north container ancestor, 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. The west east south north is the enclosing rectangle, area is the polygon area in km^2 while f_area is the actual area of the ancestor polygon, container is the ID of the polygon that contains this polygon (-1 if none), and ancestor is the ID of the polygon in the full resolution set that was reduced to yield this polygon (-1 if full resolution). For line data the header is simply ID npoints hierarchical-level source west east south north
- 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.
- Only output information for the polygon that matches id [default outputs all polygons].
- Only output a listing of polygon or line segment headers [default outputs headers and data records].
- Start all header records with the GMT multiple segment indicator '>' [Default uses P for polygons and L for lines].
To convert the entire intermediate GSHHS binary data to ASCII, run
gshhs gshhs_i.b > gshhs_i.txt
To only get a listing of the headers for the river data set at full resolution, try