convert_shapefile: Convert shapefile to extrapolation-grid

View source: R/convert_shapefile.R

convert_shapefileR Documentation

Convert shapefile to extrapolation-grid

Description

convert_shapefile reads in a shapefile and creates an extrapolation with a chosen resolution

Usage

convert_shapefile(
  file_path,
  projargs = NULL,
  grid_dim_km = c(2, 2),
  projargs_for_shapefile = NULL,
  make_plots = FALSE,
  quiet = TRUE,
  area_tolerance = 0.05,
  ...
)

Arguments

file_path

path for shapefile on harddrive

projargs

A character string of projection arguments used to project the shapefile prior to construction an extrapolation-grid; the arguments must be entered exactly as in the PROJ.4 documentation; Default projargs=NULL uses UTM and infers the UTM zone based on the centroid of the shapefile.

grid_dim_km

numeric-vector with length two, giving the distance in km between cells in the automatically generated extrapolation grid; only used if Region="other"

projargs_for_shapefile

projection-arguments (e.g., as parsed by sp::CRS), that are used when reading shapefile and overriding any projection arguments already saved there; Default projargs_for_shapefile=NULL uses the projection arguments available in the shapefile

make_plots

Boolean indicating whether to visualize inputs and outputs as maps

...

other objects passed for individual regions (see example script)

Value

extrapolation-grid

Author(s)

Cecilia O'Leary, James Thorson

Examples

## Not run: 
 convert_shapefile( file_path="C:/Users/James.Thorson/Desktop/Work files/AFSC/2020-03 -- Add ICES grids/IBTS grids/BITS/Shapefile.shp", make_plots=TRUE )

## End(Not run)


James-Thorson/FishStatsUtils documentation built on Feb. 6, 2024, 4:26 a.m.