coastlineCut {oce}R Documentation

Cut a coastline file at specified longitude

Description

Cut a coastline file at specified longitude

Usage

coastlineCut(coastline, lon_0 = 0)

Arguments

coastline

original coastline object

lon_0

longitude as would be given in a +lon_0= item in a proj.4 string

Details

This can be helpful in preventing mapPlot from producing ugly horizontal lines in world maps. These lines occur when a coastline segment is intersected by longitude lon_0+180. Since the coastline files in the oce and ocedata packages are already "cut" at longitudes of -180 and 180, the present function is not needed for default maps, which have +lon_0=0. However, may help with other values of lon_0.

This function is provisional. Its behaviour, name and very existence may change through the late months of 2015. One part of the development plan is to see if there is common ground between this and the clipPolys function in the PBSmapping package.

Value

a new coastline object

Examples

library(oce)
data(coastlineWorld)
## Not run: 
mapPlot(coastlineCut(coastlineWorld, lon_0=100), proj="+proj=robin +lon_0=100", fill='gray')

## End(Not run)


[Package oce version 0.9-18 Index]