as.coastline {oce}R Documentation

Coerce data into coastline dataset

Description

Coerces a sequence of latitudes and longitudes into a coastline dataset.

Usage

as.coastline(latitude, longitude)

Arguments

latitude the latitude in decimal degrees, positive north of the equator.
longitude the longitude in decimal degrees, positive north of Greenwich.

Details

This may be used when read.coastline cannot read a file, or when the data have been manipulated.

Value

An object of class "coastline" (for details, see read.coastline).

Author(s)

Dan Kelley

References

The NOAA site http://www.ngdc.noaa.gov/mgg/shorelines/shorelines.html is a good source for coastline data files.

See Also

You may also use read.coastline to read a coastline file. Plotting is typically done with plot.coastline, although it is sufficient to just use plot for coastline objects.

Examples

## Not run: 
d<-read.table("bbasin.dat",header=FALSE) # dataset not provided with oce
HH <-c(1645:2105) # main outline of Halifax Harbour
GI <-c(4866:4885) # George's Island
coastline.hal <- as.coastline(latitude[c(HH,GI)],longitude[c(HH,GI)]-360)
## End(Not run)

[Package oce version 0.1-76 Index]