combine_tdat_design: Combine spatial points data frames from TerrADat and sample...

View source: R/spatial_manipulation.R

combine_tdat_designR Documentation

Combine spatial points data frames from TerrADat and sample design databases

Description

Combines a list of spatial points data frames into a single spatial points data frame with only the variables common to all points. This also drops all the design points which correspond to TerrADat points because we want to use the actual sampled locations to determine weighting.

Usage

combine_tdat_design(
  terradat_points,
  design_points,
  by = "key",
  add_coords = TRUE,
  projection = NULL
)

Arguments

design_points

Spatial points data frame or list of spatial points data frames. These must be points with the variables from AIM terrestrial sample design databases.

by

Character string. The method to compare the TerrADat points and the design points to identify the design points that correspond to the TerrADat points. If "key" then it will be by the TerADat primary keys. If those are not populated in the design points, then use "spatial" to assume that any points within 100 m of the TerrADat points was sampled. Defaults to "key".

projection

Optional CRS object. Used as the projection for the output. If NULL then the projection from the points at index 1 of tdat_points will be used instead. Defaults to NULL.

tdat_points

Spatial points data frame or list of spatial points data frames. These must be points with the variables from TerrADat.

Value

Spatial points data frame with only variables common to all input points.


nstauffer/aim.analysis documentation built on Nov. 2, 2023, 12:52 a.m.