Learn R Programming

oce (version 0.1.69)

as.coastline: 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.

Value

  • A coastline object containing
  • processing.logA processing log in the standard oce format.
  • dataa list containing longitude, in decimal degrees positive east of Greenwich, and latitude, in decimal degrees positive north of the equator.

Details

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

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

Run this code
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.halifax<-as.coastline(latitude[c(HH,GI)],longitude[c(HH,GI)]-360)

Run the code above in your browser using DataLab