Package 'picMaps'

Title: Mapping Utilities for The Pacific Ocean
Description: This package provides objects and functions for making plots and maps easier to create in the Pacific Ocean.
Authors: Devin S. Johnson
Maintainer: Devin S. Johnson <[email protected]>
License: CC0
Version: 0.1.9005
Built: 2024-10-12 05:57:51 UTC
Source: https://github.com/PIFSC-Protected-Species-Division/picMaps

Help Index


Functions To Aid Mapping of PIFSC Data

Description

This package is a collection of functions that helps gather spatial data for creating maps in the Pacific Ocean.

Package: picMaps
Version: 0.1.9003
Date: March 7, 2024
License: CC0
LazyLoad: yes

Note

This software package is developed and maintained by scientists at the NOAA Fisheries Pacific Islands Fisheries Science Center and should be considered a fundamental research communication. The recommendations and conclusions presented here are those of the authors and this software should not be construed as official communication by NMFS, NOAA, or the U.S. Dept. of Commerce. In addition, reference to trade names does not imply endorsement by the National Marine Fisheries Service, NOAA. While the best efforts have been made to insure the highest quality, tools such as this are under constant development and are subject to change.

Author(s)

Devin S. Johnson <[email protected]> (Maintainer)


Download ETOPO 2022 Bathymetery data

Description

Downloads bathymetery data for map making.

Usage

etopo_download(resolution = 60, force = FALSE)

Arguments

resolution

numeric resolution in arcsecs (one of 30, or 60). Defaults to 60 arcsecs.

force

Logical. If data has previously been downloaded, it will force a new download and update of the OSM data.

Author(s)

Devin S. Johnson

References

https://osmdata.openstreetmap.de/data/land-polygons.html


Extract Bathymetry Data From Downloaded ETOPO 2022 data.

Description

The majority of this function is taken from the topotools package here: https://github.com/BigelowLab/topotools/tree/main. It was modified to work within the 'picMaps' package.

Usage

etopo_rast(x, resolution = 60, proj = TRUE, ...)

Arguments

x

an sf spatial object that will define the extent of the bathymetry raster.

resolution

Resolution of the ETOPO bathymetry raster, either 60 or 30 arc-seconds. Defaults to resolution = 60.

proj

Logical. Should the resulting raster be projected to the same CRS as x? Defaults to project = TRUE.

...

Addtional arguments passed to terra::project.

References

  • NOAA National Centers for Environmental Information. 2022: ETOPO 2022 15 Arc-Second Global Relief Model. NOAA National Centers for Environmental Information. DOI: 10.25921/fd45-gt74. Accessed 2023-03-17.

  • https://github.com/BigelowLab/topotools/tree/main


Show picMaps Data Storage Directory

Description

This function provides the location where 'picMaps' is storing and retrieving spatial data.

Usage

get_data_loc()

Coast polygons for Main Hawaiian Islands

Description

Coast polygons for Main Hawaiian Islands

Usage

hawaii_coast(keep = 1, union = TRUE)

Arguments

keep

see osm_coast

union

see osm_coast


Get A Coastline sf Polygon Object For Plotting and Mapping

Description

Uses downloaded OSM data for constructing an sf polygon coastline data object. Prior to using this function you must run osm_download.

Usage

osm_coast(x, keep = 0.2, union = FALSE)

Arguments

x

An sf spatial object. The coastline will be cropped to the bounding box.

keep

The amount of data retained after simplification with ms_simplify

union

Logical. Should the returned object be returned as a single sf MULTIPOLYGON object

Author(s)

Josh M. London and Devin S. Johnson


Download Open Street Map Coastline Shapefile from Daylight Map Distribution

Description

Downloads OSM data for plotting telemetry data and use distributions.

Usage

osm_download(force = FALSE, clean_shp = TRUE)

Arguments

force

Logical. If data has previously been downloaded, it will force a new download and update of the OSM data.

clean_shp

Logical. If 'TRUE' the original shape file will be deleted and only the '.gpkg' file will be retained.

Author(s)

Devin S. Johnson and Josh M. London

References

https://osmdata.openstreetmap.de/data/land-polygons.html


Download Open Street Map Coastline Shapefile from Daylight Map Distribution

Description

Downloads OSM data for plotting telemetry data and use distributions.

Usage

osm_install(zip_file, force = FALSE, clean_shp = TRUE)

Arguments

zip_file

path to the OSM data .zip file 'land-polygons-complete-4326.zip'. If left unspecified, the user will see a directory browser to navigate to it. See the url in the references to download it by hand. Also, see 'osm_download' to download and install it.

force

Logical. If data has previously been downloaded or installed, it will force a new install and update of the OSM data.

clean_shp

Logical. If 'TRUE' the original shape file will be deleted and only the '.gpkg' file will be retained.

Author(s)

Devin S. Johnson and Josh M. London

References

Get information here: https://osmdata.openstreetmap.de/data/land-polygons.html and download with this link https://osmdata.openstreetmap.de/download/land-polygons-complete-4326.zip


Set Data Storage Directory

Description

The directory specified by path will be used to store downloaded spatial data. By storing the data in a separate directory from the installed package it will not need to be re-downloaded when the package is updated. You simply need to rerun this function to let the package functions know where the data is located.

Usage

set_data_storage(path = "~/.picmaps_data")

Arguments

path

A directory path specifying where spatial data will be stored for the package