addmapproj: Add a map projection

Description Usage Arguments Author(s) See Also Examples

Description

GSHHS map data are provided in a geographical grid. This function adds a map projection to the latitude/longitude version of the map. Currently only one map projection may be added and the user has to keep track of which this is themselves.

Usage

1

Arguments

map

A map object as returned by getmapdata

proj

A PROJ.4 specification of the requested map projection. See proj for details, prefined objects for ESPG:3408 and EPSG:32661 exist and can be used directly. Default units are km for both.

Author(s)

Øystein Godøy (o.godoy@met.no)

See Also

getmapdata, plotmapdata

Examples

1
2
3
4
5
6
    # Plot geographical data
    mymap <- getmapdata("gshhs_c.b",xlim=c(-20,40),ylim=c(40,80))
    plotmap(mymap)
    # Add polar stereographic data and plot
    mymap <- addmapproj(mymap,"+proj=stere +lat_ts=60 +lat_0=90 +lon_0=0 +a=6371000 +b=6371000 +units=km")
    plotmap(mymap,proj="projected")

steingod/R-makemymap documentation built on May 30, 2019, 2:31 p.m.