globe: Geocentric (XYZ) coordinates

View source: R/globe.R

globeR Documentation

Geocentric (XYZ) coordinates

Description

Convert longitude/latitude coordinates to geocentric coordinates.

Usage

globe(x, ...)

## S3 method for class 'mesh3d'
globe(x, gproj = NULL, ...)

## Default S3 method:
globe(x, gproj = "+proj=geocent +datum=WGS84", ...)

Arguments

x

a silicate model or mesh3d

...

arguments to methods (none used)

gproj

Geocentric PROJ.4 string, defaults to WGS84

Details

With silicate data checks are made for the projection in use, but not for mesh3d. In that case data are assumed to be 'longitude,latitude,elevation'.

Value

object with vertices table modified

Examples

data(simpleworld)
g <- globe(silicate::PATH(as(simpleworld, "SpatialLinesDataFrame")))
if (interactive()) {
 plot(g, lwd = 3)
 plot3d(g)
 rgl::open3d()
 wire3d(globe(DEL0(gebco*50)), col = "grey");
 rgl::spheres3d(0, 0, 0, rad = 6000000,col = "aliceblue")
}

hypertidy/rangl documentation built on Nov. 24, 2022, 10:29 p.m.