project.Map {TeachingDemos}R Documentation

Apply projections to Map objects (from maptools package)

Description

Apply the mapproject function from the mapproj library to Map objects from the maptools library.

Usage

project.Map(Map, projection = "", parameters = NULL, orientation = c(90, 0, 0))

Arguments

Map A Map object.
projection See mapproject
parameters See mapproject
orientation See mapproject

Details

This function takes a Map object and applies mapproject from the mapproject library to it.

Value

An object of class Map with the coordinates transformed.

Note

This is beta level software and will someday be superceded by the spproj package.

Author(s)

Greg Snow greg.snow@intermountainmail.org

See Also

mapproject from the mapproj library.

Examples

## Not run: 

library(mapproj)
# assumes that the time zone shape files have been downloaded
# from: http://openmap.bbn.com/data/shape/timezone/

tz <- read.shape('WRLDTZA')
plot(Map2poly(project.Map(tz,'bonne',param=45)))

plot(Map2poly(project.Map(tz,'bonne',param=45)),
  col=rainbow(48)[tz$att.data$OFFSET])

plot(Map2poly(project.Map(tz,'albers',param=c(30,40))))
## End(Not run)

[Package TeachingDemos version 1.4 Index]