dgconstruct: Construct a discrete global grid system (dggs) object

View source: R/dggridR.R

dgconstructR Documentation

Construct a discrete global grid system (dggs) object

Description

Construct a discrete global grid system (dggs) object

Usage

dgconstruct(
  projection = "ISEA",
  aperture = 3,
  topology = "HEXAGON",
  res = NA,
  precision = 7,
  area = NA,
  spacing = NA,
  cls = NA,
  resround = "nearest",
  metric = TRUE,
  show_info = TRUE,
  azimuth_deg = 0,
  pole_lat_deg = 58.28252559,
  pole_lon_deg = 11.25
)

Arguments

projection

Type of grid to use. Options are: ISEA and FULLER. Default: ISEA3H

aperture

How finely subsequent resolution levels divide the grid. Options are: 3, 4. Not all options work with all projections and topologies. Default: 3

topology

Shape of cell. Options are: HEXAGON, DIAMOND, TRIANGLE. Default: HEXAGON

res

Resolution. Must be in the range [0,30]. Larger values represent finer resolutions. Appropriate resolutions can be found with dg_closest_res_to_area(), dg_closest_res_to_spacing(), and dg_closest_res_to_cls(). Default is 9, which corresponds to a cell area of ~2600 sq km and a cell spacing of ~50 km. Only one of res, area, length, or cls should be used.

precision

Round output to this number of decimal places. Must be in the range [0,30]. Default: 7.

area

The desired area of the grid's cells. Only one of res, area, length, or cls should be used.

spacing

The desired spacing between the center of adjacent cells. Only one of res, area, length, or cls should be used.

cls

The desired CLS of the cells. Only one of res, area, length, or cls should be used.

resround

What direction to search in. Must be nearest, up, or down.

metric

Whether input and output should be in metric (TRUE) or imperial (FALSE)

show_info

Print the area, spacing, and CLS of the chosen resolution.

azimuth_deg

Rotation in degrees of grid about its pole, value in [0,360]. Default=0.

pole_lat_deg

Latitude in degrees of the pole, value in [-90,90]. Default=58.28252559.

pole_lon_deg

Longitude in degrees of the pole, value in [-180,180]. Default=11.25.

Value

Returns a dggs object which can be passed to other dggridR functions

Examples

library(dggridR)
dggs <- dgconstruct(res=20)

dggs <- dgconstruct(area=5,metric=FALSE)

dggridR documentation built on Jan. 22, 2023, 1:15 a.m.