Learn R Programming

globe (version 1.2-0)

flatearth:

Description

Plots the Earth as specified 2D projection, with a map of the major coastline.

Usage

flatearth(projection = c("atlas", "cylindrical"), gdata, runlen, asp = NULL,
          ..., do.plot=TRUE)

Arguments

projection
The type of 2D projection to be performed.
gdata
Two-column matrix of latitude, longitude coordinates of coastline vertices. Defaults to earth$coords. If NULL, no coastline is plotted.
runlen
Integer vector giving the number of vertices in each connected polygon in the coastline. Defaults to earth$runlen.
asp
Optional. Aspect ratio of the longitude and latitude scales.
Optional arguments passed to segments to control the plotting of the coastline.
do.plot
Logical value indicating whether to actually perform the plotting, or just to return the calculated coordinates.

Value

(Invisibly) a 4-column matrix containing the projected \((x,y)\) coordinates of the segments of the coastline.

Details

In the atlas projection, the continents are plotted in longitude, latitude coordinates without any correction.

In the cylindrical projection, the latitude is transformed so that equal areas on the sphere are transformed onto equal areas on the plot.

See Also

globeearth.

Use flatpoints to plot points on the image.

Examples

Run this code
flatearth("atlas")
flatearth("cylindrical")

Run the code above in your browser using DataLab