If SPDF is a character string, the spatial data would be loaded and used. If SPDF is already spatial data no loading is required.
The function would use MazamaSpatialUtils::getSpatialData() and would add the specified columns to the ws_monitor$meta data frame and then return the modified ws_monitor object.
Given the behavior guaranteed by MazamaSpatialUtils, we should be able to implement a function with the following minimal signature:
If SPDF is a character string, the spatial data would be loaded and used. If SPDF is already spatial data no loading is required.
The function would use
MazamaSpatialUtils::getSpatialData()
and would add the specified columns to thews_monitor$meta
data frame and then return the modifiedws_monitor
object.