Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intFun.coast

Reproject coastline


Description

This function reprojects the coastline for a specified domain.

Usage

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

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

Automated Model Benchmarking R Package

v1.0.3
GPL-3
Authors
Christian Seiler [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.