sph2car: Cartesian coordinates

Description Usage Arguments Value Author(s)

View source: R/sph2car.R

Description

Transform a spherical coordinates set to cartesian coordinates

Usage

1
sph2car(X, deg = FALSE, rep = "sph")

Arguments

X

A numerical vector or matrix whos entries constitute sperical coordinates. A vector should have 2 or 3 entries and a matrix should have 2 or 3 columns. If the input has 2 entries or columns it will be assumed that the radial distance i 1. The order of the vector entries (matrix columns) should be longitude, latitude and radial distance (if applicable).

deg

Logical value indicating whether the input is in randians or degrees. Radian is default.

rep

States the representation of the spherical coordinates. If "sph" long will range from 0 to 2 * pi and lat will range from 0 to pi. The classical representation of spherical coordinates in radians. If "geo" long will range from -pi to pi and lat will range from 0 to pi. The geografical representation in radians. Deafult is "sph".

Value

A data.frame with 3 columns representing the cartesian coordinate set.

Author(s)

Andreas Dyreborg Christoffersen andreas@math.aau.dk


adchSTATS/spatstatsphadd documentation built on May 28, 2019, 3:54 p.m.