Skip to content

hypertidy/rgeodesy

Repository files navigation

rgeodesy

R-CMD-check

R bindings to Rust Geodesy by Thomas Knudsen — a platform for experiments with geodetic transformations and data flow.

Very early, not for use yet.

Installation

Requires a Rust toolchain (rustup).

remotes::install_github("hypertidy/rgeodesy")

Usage

library(rgeodesy)

# What operators are available?
geod_ops()

# UTM zone 55 (Tasmania) — lon/lat in, easting/northing out
geod_apply("utm zone=55", x = c(147.3, 147.5), y = c(-42.9, -42.8))

# Same but as a matrix
geod_xy("utm zone=55", x = c(147.3, 147.5), y = c(-42.9, -42.8))

# Inverse: projected -> geographic
m <- geod_xy("utm zone=55", x = c(147.3, 147.5), y = c(-42.9, -42.8))
geod_xy("utm zone=55", x = m[, "x"], y = m[, "y"], inv = TRUE)

# Pipeline with adaptor ops
geod_apply("geo:in | utm zone=32 | neu:out", x = c(12., 18.), y = c(55., 59.))

# Validate a pipeline before using it
geod_validate("utm zone=55")          # TRUE
geod_validate("utm zone=banana")      # error string

Related

Code of Conduct

Please note that the rgeodesy project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

What the Package Does (One Line, Title Case)

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors