source: subversion/applications/rendering/pdf-atlas/Data/readme-shorelines.txt @ 27530

Last change on this file since 27530 was 1127, checked in by joerg, 14 years ago

Initial Version of osm pdf Atlas

File size: 4.5 KB
Line 
1                        G S H H S
2
3Global Self-consistant Hierarchical High-resolution Shorelines
4
5Version 1.2 May 18, 1999
6
7Made programs POSIX.1 compliant and added binary open for DOS.
8
9Version 1.1, April 30, 1996
10
11Paul Wessel, G&G, SOEST, U of Hawaii (wessel@soest.hawaii.edu)
12Walter H. F. Smith, NOAA Geosciences Lab (walter.hf.smith@noaa.gov)
13
14Ref: Wessel, P., and W. H. F. Smith, 1996, A global self-consistent,
15        hierarchical, high-resolution shoreline database, J. Geophys.
16        Res., 101, 8741-8743.
17
18For details on data processing etc. we refer you to that reference.
19
20--------------------------------------------------------------------
21This README file explains the usage of the gshhs data sets.  The
22archive consists of the following files (after you unzip the compressed
23files using gzip -d):
24
25Name            Content
26--------------------------------------------------------------------
27README          This file
28gshhs.h         Header file for programs
29gshhs.c         Program to extract ASCII data
30gshhs_dp.c      Program to decimate polygons
31gshhs_f.b       Full resolution data
32gshhs_h.b       High resolution data
33gshhs_i.b       Intermediate resolution data
34gshhs_l.b       Low resolution data
35gshhs_c.b       Crude resolution data
36
37In addition, the following program was supplied by Simon Cox (simon@ned.dem.csiro.au)
38and can be used to import the *.b files into a GRASS database:
39
40gshhstograss.c  Import *.b into GRASS GIS database
41
42All the *.b file share the same file structure; thus the gshhs program can
43read and extract data from any of the files.  The program's purpose is
44simply to demonstrate how a programmer may access the data.  Presumably,
45the user wants to access the data from within his/her own programs.
46If plotting the data is the only purpose, we strongly recommend you
47instead use the GMT package which comes with the same data and tools for
48plotting filled landmasses, coastlines, political borders, and rivers.
49        The file(s) contain several successive logical blocks of the form
50
51<polygon header>
52<polygon points>
53
54Each header consist of the following variables:
55
56int id;                         /* Unique polygon id number, starting at 0 */
57int n;                          /* Number of points in this polygon */
58int level;                      /* 1 land, 2 lake, 3 island_in_lake, 4 pond_in_island_in_lake */
59int west, east, south, north;   /* min/max extent in micro-degrees */
60int area;                       /* Area of polygon in 1/10 km^2 */
61short int greenwich;            /* Greenwich is 1 if Greenwich is crossed */
62short int source;               /* 0 = CIA WDBII, 1 = WVS */
63
64Here, int is 4-byte integers and short means 2-byte integers.
65
66The polygon points are stored as n successive records of the form
67
68int     x;      /* longitude of a point in micro-degrees */
69int     y;      /* latitude of a point in micro-degrees */
70
71On some systems, the byte order is swapped relative to the order used on
72a Sun workstation (on which the current data were processed).  To
73determine if you need to swap the byte pairs, do the following test:
74
751. Compile gshhs
762. Run gshhs gshhs_c.b | head -1        # This shows the 1st line of output
773. If the output does not look exactly like the next line:
78
79P      0    1240 1 W 79793839.900 -17.53378 190.32600 -34.83044  77.71625
80
81   you most likely need to swap the byte-pairs.  Simply recompile gsggs with
82  the switch -DFLIP and see if that did the trick.
834. If all fails you may email one of the authors for advice.
84
85Compile the two programs as follows (with or without the -DFLIP switch):
86
87cc -O gshhs.c -o gshhs [-DFLIP]
88cc -O gshhs_dp.c -o gshhs_dp -lm [-DFLIP]
89
90[and optionally cc -O -o gshhstograss gshhstograss.c -lm [-DFLIP]]
91
92We have provided 5 different resolution of the data which should
93satisfy just about any user.  The [h,i,l,c]-versions were
94derived from the gshhs_f.b full resolution file using the
95Douglas-Peucker algorithm as implemented in gshhs_dp.c  The
96tolerances used were:
97
98File            Content                 Tolerance
99-------------------------------------------------
100gshhs_h.c       High resolution         0.2 km
101gshhs_i.c       Interm. resolution      1.0 km
102gshhs_l.c       Low resolution          5.0 km
103gshhs_c.c       Crude resolution        25  km
104
105However, should you need to decimate the full data set using a
106different tolerance you can use the program gshhs_dp to do so:
107
108gshhs_dp gshhs_f.b your_tolerance_in_km newfile.b
109
110gshhs.c can then read the resulting newfile.b
111[Note that output from gshhs_dp WILL NOT need byte swapping since
112it is created on your machine].
113
114The Douglas-Peucker routine implemented in gshhs_dp was kindly
115provided by Dr. Gary J. Robinson, Environmental Systems Science Centre,
116University of Reading, Reading, UK (gazza@mail.nerc-nutis.ac.uk).
117
118Good Luck,
119Paul Wessel and Walter. H. F. Smith
120
121GMT URL:   http://gmt.soest.hawaii.edu/
Note: See TracBrowser for help on using the repository browser.