Skip to content

Unable to download shapefiles saved in ScienceBase cloud service #341

Description

@shannonMendia

Having trouble downloading shapefiles with sbtools since ScienceBase started saving shapefiles in the cloud- they aren't downloading correctly from sbtools. I've successfully used sbtools::item_file_download() for other shapefiles but this year SB saved it differently in the system and it's not recognized as a shapefile by ArcGIS Pro or arcgisbinding code. If I manually download all the pieces of the shapefile or the zipped version, it works fine.

The code I used that won't work (2025 dataset):
if (!require("pacman")) install.packages("pacman")
pacman::p_load(arcgisbinding, sbtools)
arc.check_product()
item_file_download("69330512d4be02765ea81805", dest_dir="...") # where ... is your desired directory
SWFL_SurveyAreas_2025_sf <- arc.data2sf(arc.select(arc.open(".../SWFL_SurveyAreas_2025.shp")))
https://doi.org/10.5066/P96VC5Y4 or https://www.sciencebase.gov/catalog/item/69330512d4be02765ea81805

Example of a dataset that works as expected (2024 dataset):
if (!require("pacman")) install.packages("pacman")
pacman::p_load(arcgisbinding, sbtools)
arc.check_product()
item_file_download("67880cf0d34e60ddd4de2aa6", dest_dir="...") # where ... is your desired directory
SWFL_SurveyAreas_2024_sf <- arc.data2sf(arc.select(arc.open(".../SWFL_SurveyAreas_2024.shp")))
https://doi.org/10.5066/P96VC5Y4 or https://www.sciencebase.gov/catalog/item/67880cf0d34e60ddd4de2aa6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions