project.Map {TeachingDemos}R Documentation

Apply projections to Map objects (from maptools package)

Description

This function is depricated, use project from the rgdal package instead.

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, there are now better alternatives in the sp or related packages.

Note

This function works on Map objects which are not really used anymore, the spatial data frames from the sp package are a better option and the project function from package rgdal is a better way to do this now.

Author(s)

Greg Snow greg.snow@imail.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 <- maptools:::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 2.7 Index]