Skip to contents

Grid creation

Items relevant for creating grids.

trigrid-class trigrid
A triangular icosahedral grid
hexagrid-class hexagrid
Construct a penta-hexagonal icosahedral grid
triguide
Tessellation guide to trigrid objects
hexguide
Tessellation guide to hexagrid objects

Grid properties

Functions useful to access properties, attributes and subparts of the grid.

vertices()
The vertices of an icosahedral grid object
orientation() `orientation<-`()
Extracting and setting the grid orientation
edges()
The edges of a 3d object
faces()
The faces of a 3d object
length(<trigrid>) length(<gridlayer>)
The number of faces in a trigrid or hexagrid class object.
centers()
The face centers of an icosahedral grid object
edgelength()
Lengths of grid edges
surfacearea()
Areas of grid cell surfaces
trishape()
Shape distortions of the triangular faces and subfaces
pos()
Position of face centers and vertices on a grid

Grids as graphs

Functions relevant to treating the icosahedral grids as graph (network objects). These methods rely and interface with the ‘igraph’ package.

gridgraph()
Create or instantiate an graph class graph from the faces of an icosahedral grid
vicinity()
The neighbouring faces of faces in an icosahedral grid

Grid operations

Functions useful for modifying grid structure.

SpLines()
Create a SpatialLines class object from an icosahedral grid
SpPolygons()
Spatial polygons from an icosahedral grid
newsf()
Add a sf object to a predefined slot in a trigrid or hexagrid object
newsp()
Add a SpatialPolygons object to a predefined slot in a trigrid or hexagrid object
newgraph()
Add an igraph object to a predefined slot in an icosahedral grid
rotate rotate(<trigrid>)
Rotation of trigrid and hexagrid objects
translate()
Translating an icosahedral grid object in 3d Cartesian space
subset subset(<trigrid>) subset(<hexagrid>) `[`(<trigrid>,<ANY>,<ANY>) subset(<gridlayer>)
Subsetting an icosahedral grid or data layers organized with them

2D plotting

Functions useful for 2d plotting and interaction with 2d plots. These functions rely either on the sf or sp packages.

plot plot(<trigrid>,<ANY>) plot(<facelayer>,<ANY>) plot(<trigrid>,<vector>) plot(<trigrid>,<table>)
Plot method for the trigrid, hexagrid or facelayer classes
lines(<trigrid>)
Lines method for the trigrid and hexagrid classes
gridlabs()
Labels of grid vertices, faces and edges.
cellocator()
Locate grid faces based on their positions on a map
heatMapLegend()
Legend for a heatmap with predefined colors.

3D plotting

Functions useful for 3d plotting. These items rely on the ‘rgl’ package.

plot3d()
3d plotting of an icosahedral grid, its subset or a data layer
lines3d lines3d(<trigrid>) lines3d(<Line>) lines3d(<Lines>) lines3d(<SpatialLines>) lines3d(<SpatialLinesDataFrame>) lines3d(<Polygon>) lines3d(<Polygons>) lines3d(<SpatialPolygons>) lines3d(<SpatialPolygonsDataFrame>)
Methods of 3d line plotting
faces3d()
Methods of 3D face plotting.
gridlabs3d()
Display the names of the grid elements in 3d plots.
guides3d()
Guides for 3d spherical plotting.

Interfacing

Items needed for external data to interact with the grids.

locate()
Basic lookup function of coordinates on an icosahedral grid
occupied()
Faces occupied by the specified object
resample resample(<SpatRaster>,<trigrid>) resample(<facelayer>,<trigrid>) resample(<facelayer>,<SpatRaster>)
Resampling of data involving a trigrid or a hexagrid object.
gridensity()
Icosahedral grid-based density estimation

Gridlayer/facelayer

In development native grid-based data containers.

facelayer-class facelayer
A facelayer linked to a trigrid or hexagrid object
names(<gridlayer>)
The face names in a facelayer class object
values() `values<-`()
Extract and replace values from a gridlayer-derived object (e.g. link{facelayer}).
resample resample(<SpatRaster>,<trigrid>) resample(<facelayer>,<trigrid>) resample(<facelayer>,<SpatRaster>)
Resampling of data involving a trigrid or a hexagrid object.
`[`(<gridlayer>,<ANY>,<missing>) `[`(<gridlayer>,<SpatExtent>,<missing>) `[<-`(<gridlayer>,<ANY>,<ANY>)
Extraction from a gridlayer using indices

Utilities

Functions for general use in spherical geometry, such as distance measurement, coordinate conversion. In general, these apply to point data.

rpsphere()
Random point generation on the surface of a sphere
CarToPol()
Conversion of 3d Cartesian coordinates to polar coordinates
PolToCar()
Conversion of polar coordinates to 3d Cartesian coordinates
arcdist()
Calculation of distances along arcs
arcdistmat()
Calculation of distance matrices along arcs
arcpoints()
Calculation of point coordinates along an arc
surfacecentroid()
Surface centroid point of a spherical point cloud
chullsphere()
Spherical convex hull.