coastlineCut: Cut a Coastline Object at Specified Longitude

Description Usage Arguments Value Caution See Also Examples

Description

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.

Usage

1
coastlineCut(coastline, lon_0 = 0)

Arguments

coastline

original coastline object

lon_0

longitude as would be given in a +lon_0= item in a call to project in the rgdal package.

Value

a new coastline object

Caution

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

See Also

Other things related to coastline data: [[,coastline-method, [[<-,coastline-method, as.coastline, coastline-class, coastlineBest, coastlineWorld, download.coastline, plot,coastline-method, read.coastline.openstreetmap, read.coastline.shapefile, subset,coastline-method, summary,coastline-method

Examples

1
2
3
4
5
6
library(oce)
data(coastlineWorld)
## Not run: 
mapPlot(coastlineCut(coastlineWorld, lon_0=100), proj="+proj=robin +lon_0=100")#, col='gray')

## End(Not run)


Search within the oce package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.