google_elevation: Function to find elevation from latitude and longitude...

View source: R/google_elevation.R

google_elevationR Documentation

Function to find elevation from latitude and longitude coordinate pairs using Google Maps API.

Description

The Google Maps API is not open-source, therefore check the licensing conditions for usage conditions (https://developers.google.com/maps/terms). Users of this function must use the elevation data to display on a Google Map.

Usage

google_elevation(
  latitude,
  longitude,
  key,
  round = NA,
  vector = TRUE,
  progress = "none"
)

Arguments

latitude

Numeric vector of latitude values.

longitude

Numeric vector of longitude values.

key

Google Maps API key.

round

Number of decimal points to round the elevation variable to. Default is no rounding.

vector

Should the function only return a vector of elevation? Default is TRUE but a data frame can be returned with FALSE.

progress

Type of progress bar to display. Default is "none".

Value

Either a data frame containing latitude and longitude pairs, elevation estimate, and (horizontal) resolution of elevation estimate or a numeric vector containing only elevation estimates.

Author(s)

Stuart K. Grange


skgrange/gissr documentation built on June 20, 2024, 12:02 a.m.