intFun.coast: Reproject coastline

Description Usage Arguments Value Examples

View source: R/intFun.R

Description

This function reprojects the coastline for a specified domain.

Usage

1
2
intFun.coast(my.xlim, my.ylim,
  my.projection = "+proj=longlat +ellps=WGS84", shp.filename)

Arguments

my.xlim

An R object with minimum and maximum longitude, e.g. c(-171, -23)

my.ylim

An R object with minimum and maximum latitude, e.g. c(32, 75)

my.projection

An R string that defines the desired projection, e.g. '+proj=ob_tran +o_proj=longlat +o_lon_p=83. +o_lat_p=42.5 +lon_0=263.'

shp.filename

An R string that gives the name of a shapefile that should be reprojected

Value

Reprojected coastline

Examples

1
2
3
4
5
6
7
8
library(rgdal)
library(rgeos)
my.xlim <- c(-171, -23)
my.ylim <- c(32, 75)
my.projection <- '+proj=ob_tran +o_proj=longlat +o_lon_p=83. +o_lat_p=42.5 +lon_0=263.'
shp.filename <- system.file('extdata/ne_110m_land/ne_110m_land.shp', package = 'amber')
land <- intFun.coast(my.xlim, my.ylim, my.projection, shp.filename)
raster::plot(land)

amber documentation built on Aug. 28, 2020, 5:08 p.m.