#'
#' @title Create a \code{sf} dataframe representing a ROMS grid from a shapefile
#'
#' @description Function to create a \code{sf} dataframe representing a ROMS grid from a shapefile.
#'
#' @param shapefile - path to shapefile derived from ROMS grid.
#' @param strCRS - coordinate reference for a shapefile
#'
#' @return A \code{sf} dataframe object representing the grid
#'
#' @details Uses \code{wtsGIS::createLayerFromShapefile} to create an sf dataframe from
#' a shapefile derived from a ROMS grid.
#'
#' @export
#'
createGridFromShapefile<-function(shapefile,
strCRS = wtsGIS::get_crs("AlaskaAlbers")[1]){
roms_grid<-wtsGIS::createLayerFromShapefile(shapefile,
strCRS = strCRS,
as.sf = TRUE);
return(roms_grid);
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.