Package index
-
dgconstruct() - Construct a discrete global grid system (dggs) object
-
dgsetres() - Set the resolution of a dggs object
-
dgverify() - Verify that a dggs object has appropriate values
Grid Information
Inspect a dggs object: print a summary, retrieve per-resolution statistics, count cells, and automatically select a resolution from a target area, spacing, or characteristic length scale.
-
dginfo() - Print info about a dggs object to the screen
-
dggetres() - Get table of grid resolution information
-
dgmaxcell() - Get largest cell id for a dggs
-
dg_closest_res() - Determine an appropriate grid resolution based on input data.
-
dg_closest_res_to_area() - Determine resolution based on desired area
-
dg_closest_res_to_cls() - Determine an appropriate grid resolution based on a desired characteristic length scale of the cells.
-
dg_closest_res_to_spacing() - Determine grid resolution from desired spacing.
Grid Materialization
Generate grid cell boundaries as sf geometries for plotting and spatial analysis.
-
dgearthgrid() - Return the coordinates constituting the boundary of cells for the entire Earth
-
dgcellstogrid() - Return boundary coordinates for specified cells
-
dgrectgrid() - Return the coordinates constituting the boundary of cells within a specified region
-
dgshptogrid() - Return boundary coordinates for cells intersecting a shapefile
Point Aggregation
Aggregate lon/lat point data into grid cells. dgpoints_to_cells() returns an sf grid (optionally with per-cell counts); dgbin_points() returns a lightweight data frame of per-cell statistics.
-
dgpoints_to_cells() - Return grid cells containing input points
-
dgbin_points() - Aggregate point data into grid cells
Cell Relationships
Query spatial relationships between cells. dgneighbors() finds adjacent hexagonal cells; dgchildren() and dgparent() navigate the grid hierarchy across resolution levels.
-
dgneighbors() - Return neighboring cell IDs for each input cell
-
dgchildren() - Return immediate child cell IDs for each input cell
-
dgparent() - Return parent cell ID for each input cell
Coordinate Conversion
Convert between the five cell address systems supported by DGGRID: GEO (geographic lon/lat), SEQNUM (globally unique integer cell ID), Q2DI (quad-based integer coordinates), Q2DD (quad-based double coordinates), and PROJTRI (projected triangle coordinates). Functions follow the naming convention dgINPUT_to_OUTPUT. dgGEO_to_SEQNUM() and dgSEQNUM_to_GEO() are the most commonly used.
-
dgGEO_to_GEO() - Convert from GEO to GEO
-
dgGEO_to_PLANE() - Convert from GEO to PLANE
-
dgGEO_to_PROJTRI() - Convert from GEO to PROJTRI
-
dgGEO_to_Q2DD() - Convert from GEO to Q2DD
-
dgGEO_to_Q2DI() - Convert from GEO to Q2DI
-
dgGEO_to_SEQNUM() - Convert from GEO to SEQNUM
-
dgSEQNUM_to_GEO() - Convert from SEQNUM to GEO
-
dgSEQNUM_to_PLANE() - Convert from SEQNUM to PLANE
-
dgSEQNUM_to_PROJTRI() - Convert from SEQNUM to PROJTRI
-
dgSEQNUM_to_Q2DD() - Convert from SEQNUM to Q2DD
-
dgSEQNUM_to_Q2DI() - Convert from SEQNUM to Q2DI
-
dgSEQNUM_to_SEQNUM() - Convert from SEQNUM to SEQNUM
-
dgQ2DI_to_GEO() - Convert from Q2DI to GEO
-
dgQ2DI_to_PLANE() - Convert from Q2DI to PLANE
-
dgQ2DI_to_PROJTRI() - Convert from Q2DI to PROJTRI
-
dgQ2DI_to_Q2DD() - Convert from Q2DI to Q2DD
-
dgQ2DI_to_Q2DI() - Convert from Q2DI to Q2DI
-
dgQ2DI_to_SEQNUM() - Convert from Q2DI to SEQNUM
-
dgQ2DD_to_GEO() - Convert from Q2DD to GEO
-
dgQ2DD_to_PLANE() - Convert from Q2DD to PLANE
-
dgQ2DD_to_PROJTRI() - Convert from Q2DD to PROJTRI
-
dgQ2DD_to_Q2DD() - Convert from Q2DD to Q2DD
-
dgQ2DD_to_Q2DI() - Convert from Q2DD to Q2DI
-
dgQ2DD_to_SEQNUM() - Convert from Q2DD to SEQNUM
-
dgPROJTRI_to_GEO() - Convert from PROJTRI to GEO
-
dgPROJTRI_to_PLANE() - Convert from PROJTRI to PLANE
-
dgPROJTRI_to_PROJTRI() - Convert from PROJTRI to PROJTRI
-
dgPROJTRI_to_Q2DD() - Convert from PROJTRI to Q2DD
-
dgPROJTRI_to_Q2DI() - Convert from PROJTRI to Q2DI
-
dgPROJTRI_to_SEQNUM() - Convert from PROJTRI to SEQNUM
-
dgquakes - All earthquakes with magnitude >=3.0 earthquakes for 2015
-
dg_shpfname_south_africa() - National border of South Africa