Skip to contents

This function will retrieve the position of a vertex or a face on a hexagrid or trigrid object.

Usage

pos(gridObj, names, output = "polar")

Arguments

gridObj

a (hexagrid or trigrid) Icosahedral grid object.

names

(character) Vector of the names that are to be looked up.

output

(character) The coordinate system in which the names are to be shown: use "polar" for longitude-latitude and "cartesian" for XYZ output.

Value

A numeric matrix.

Details

Vertex and face names can be mixed in a single names argument.

Examples

g <- trigrid(c(4,4))
pos(g, c("F2", "P6", "dummyname"))
#>           long      lat
#> F2         -54 87.86095
#> P6         126 86.03532
#> dummyname   NA       NA