knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

localgrid

Lifecycle: experimental Codecov test coverage R-CMD-check

The goal of localgrid is to make it easy to define coordinate reference systems in the Oblique Mercator projection for new or existing arbitrary floating grids.

Installation

You can install localgrid from Github with:

# install.packages("remotes")
remotes::install_github("crowcanyon/localgrid")

Example

library(localgrid)

# Define a floating CRS for a new grid
define_new_grid(
  pt_0_geo = c(-108.51, 37.385),
  pt_0_grid = c(500, 500),
  name = "Great New Grid"
)

# Or, define a floating CRS for a legacy grid
define_legacy_grid(
  pt_0_geo = c(-108.51, 37.385),
  pt_0_grid = c(500, 500),
  pt_1_geo = c(-108.511, 37.384),
  pt_1_grid = c(360, 380),
  name = "Screwy Legacy Grid"
)

# You can also use projected geographic points
define_legacy_grid(
  pt_0_geo = c(720446.8, 4140492.5),
  pt_0_grid = c(500, 500),
  pt_1_geo = c(720361.2, 4140379.2),
  pt_1_grid = c(360, 380),
  geo_crs = 6341,
  name = "Great New Grid"
)

Code of Conduct

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



crowcanyon/localgrid documentation built on March 21, 2021, 4:36 a.m.