coastfile - Specify coastline files in either TeraScan datasets or binary files.

Users can specify their own coastline files. These files must either be TeraScan datasets with parallel latitude/longitude variables or binary files in the same format as the WDB2 or DCW files.

Coastline data is generally extracted from either the Digital Chart of the world (DCW) or the Central Intelligence Agency (CIA) World Database II (WDB2). Resolution of the WDB2 database is allegedly one kilometer. However, this estimate is very optimistic for the remote areas of the world. Resolution of the DCW database is considerably better. The following coast files are available in the directory $REFDATA/coast, where $REFDATA is the TeraScan reference data directory:

Continents, major islands and lakes

Major rivers

International boundaries

National boundaries, such as states

Subsampled combination of wdb2.cil, wdb2.bdy, and wdb2.states for drawing large area maps.

Coastline, and islands with extents > 20 kilometers

Islands with extents < 20 kilometers

Lakes and two-sided rivers with extents > 20 kilometers

Lakes and two-sided rivers with extents < 20 kilometers

Rivers and streams

International boundaries

National boundaries, such as states

Subsampled combination of dcw.coast, dcw.political, and dcw.states for drawing large area maps.

Each file contains a 180x360 1 degree square index, followed by a heap filled with variable length vectors. The 1-degree squares are numbered as follows:

square = (lower lat + 90) * 360 + left lon + 180

where -90 <= lat < 90 and -180 <= lon < 180

The index is a 180x360 long integer array, indexed by square number. The index entry for a given square is the offset to the first vector in the heap for that square. The offset to the first vector in the heap is 0. All vectors for a given square are contiguous in the heap. The index entry for a square with no vectors is 0. (-1 would have been a better choice!)

The format for a given vector in the heap is shown here:

long integer square number
long integer number of (lat,lon) pairs in vector
short int lat offset #1 from lower lat in seconds
short int lon offset #1 from left lon in seconds
short int lat offset #2 from lower lat in seconds
short int lon offset #2 from left lon in seconds
etc.

Because vector segments can cross the boundaries of squares, lat and lon offsets can fall outside the range 0 to 3600 seconds.

FILES

refdata/coast/wdb2.cil, refdata/coast/wdb2.riv, refdata/coast/wdb2.bdy, refdata/coast/wdb2.states, refdata/coast/wdb2.thin, refdata/coast/dcw.coast, refdata/coast/dcw.coast_20, refdata/coast/dcw.inland, refdata/coast/dcw.inland_20, refdata/coast/dcw.streams, refdata/coast/dcw.political, refdata/coast/dcw.states, refdata/coast/dcw.thin

SEE ALSO

coast

NOTES

The vectors for the first non-empty square are not easily accessed using the above indexing scheme. That is because the index value for squares containing no vectors is the same as the index value for the first non-empty square.


Last Update: $Date: 1999/05/10 20:58:53 $