rnoaa (version 0.2.0)

latlong2bbox: Function to calculate bounding box for the extent parameter in ncdc_stations function.

Description

Function to calculate bounding box for the extent parameter in ncdc_stations function.

Usage

latlong2bbox(lat, lon, radius = 10)

Arguments

lat
Latitude, in decimal degree style
lon
Longitude, in decimal degree style
radius
Amount to create buffer by, in km

Examples

Run this code
latlong2bbox(lat=33.95, lon=-118.40) # radius of 10 km
latlong2bbox(lat=33.95, lon=-118.40, radius=2) # radius of 2 km
latlong2bbox(lat=33.95, lon=-118.40, radius=200) # radius of 200 km
latlong2bbox(lat=33.95, lon=-118.40, radius=0.02) # radius of 20 meters

Run the code above in your browser using DataCamp Workspace