spatialpos: Convert Geographical to Cartesian Coordinates

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Converts latitudes and longitudes on the sphere into 3D Cartesian coordinates.

Usage

1
  spatialpos(lon, lat)

Arguments

lon

A vector, matrix column, or list of longitudes

lat

A vector, matrix column, or list of longitudes

Details

The longitudes and latitudes can be input as a single entity (i.e. a 2 column matrix, or pair of lists) rather than as separate entities.

Value

A matrix with one row per set of Cartesian coordinates

Author(s)

Adrian Baddeley and Tom Lawrence

See Also

ensure3d ensures that the given data is a vector 3D coordinates, and where possible converts the data if they are not in this format. ensurelonlat ensures that the given data are a pair of lists, one list of for longitude, one for latitude, and where possible converts the data if they are not in this format.

Examples

1
2
spatialpos(30, 60)
spatialpos(place("nedlands"))

baddstats/globe documentation built on May 11, 2019, 5:24 p.m.