Skip to contents

Return layers as sf objects (shapefiles) or xyz dataframes (rasters).

Usage

get_shapefile(shapefile_name, crs = "EPSG:3338")

Arguments

shapefile_name

The name of a shapefile to access; current list is available with available_shapefiles()

crs

The coordinate reference system (CRS) into which shapefiles will be projected. By default, objects will be returned using the default CRS Albers Equal Area Alaska, (EPSG 3338). Any other valid projection can be specified. Note that this relies on the sf::st_crs function- make sure you are using a valid CRS argument.

Examples

# return Alaska land in default CRS
ak_land <- get_shapefile(shapefile_name = "alaska_land")

# return Alaska land in a different CRS
ak_land <- get_shapefile(shapefile_name = "alaska_land", crs = "EPSG:4326")