James-Thorson-NOAA / VAST

Spatio-temporal analysis of univariate or multivariate data, e.g., standardizing data for multiple species or stages
http://www.FishStats.org
GNU General Public License v3.0
124 stars 53 forks source link

sf error in the make_extrapolation_info call #385

Closed natpac closed 7 months ago

natpac commented 7 months ago

Hello, I would like to report an error that I get in the make_extrapolation_info call that I think is related to #380. I have updated R to 4.3.2 recently. I'm loading the sf package and using sf_use_s2(FALSE), and using the latest version of VAST and FishStatsUtils.

Grid <- make_extrapolation_info(
  max_cells = Inf,
  grid_dim_km = c(20,20),
  Region = "map_EEZ_crop/map_EEZ_crop.shp",
  quiet = FALSE)

This is the error I get: Error in shapefile_input@proj4string : no applicable method for@applied to an object of class "sf"

Is there a step that I am missing? Thanks!

James-Thorson-NOAA commented 7 months ago

Could you instead switch to providing an extrapolation-grid manually, using Region = "User"?

I'm exploring fixes, but ultimately switching development to tinyVAST, and might discontinue the Region-as-shapefile options in VAST

James-Thorson-NOAA commented 7 months ago

alternatively, please try downloading the dev branch of FishStatsUtils and see if the Region = [shapefile] option is now working ... it seems to be locally but I haven't explored thoroughly.

natpac commented 7 months ago

Using the dev branch worked. Looking forward to tinyVAST!