elevFromGg: Assign elevation to a coordinates list

Description Usage Arguments Details Value Note Author(s) References See Also

View source: R/elevFromGg.R

Description

Given a coordinates vector, download the elevation data from The Google Maps Elevation API [1].

Usage

1
2
3
4
elevFromGg(data = NULL, rd.frmt = "readRDS", path = NULL,
  API.Key = NULL, starts.in = 1, round.coord = 4, save.name = "data",
  wrt.frmt = "writeRDS", save.assigned.in = NULL,
  save.unassigned.in = NULL, save.temp.in = NULL)

Arguments

data

Vector of characters. Name of the input file.

rd.frmt

Vector of characters. The file format to read. By default it will be read as a R object using the 'readRDS' argument, but it can be read as plain text using the 'readTXT' argument. See details.

path

Vector of characters. Path to the input file.

API.Key

If the user has a google's API key, it must be used here, otherwise no more than 2500 elevations could be assigned.

See details.

starts.in

Numeric vector. Row number where should start the process.

round.coord

Integer. Number of digits to keep in coordinates.

save.name

Vector of characters. Name of the output file.

wrt.frmt

Vector of characters. Format to save the output file. By default it will be written as a R object using 'saveRDS' argument, but it can be saved as plain text using 'saveTXT' argument. See details.

save.assigned.in

Vector of characters. Path to the output file with the coordinates whose elevation was assigned. Output file will be called <alt.assigned>.

save.unassigned.in

Vector of characters. Path to the output file with the coordinates whose elevation was not assigned. Output file will be called <alt.unassigned>. See details.

save.temp.in

Vector of characters. Path to the temporal file as backup of the process. If the process is stopped, the user could reset it assigning the row number in start.in parameter and the process will start again using temporal file.

Details

For more details about the formats to read and/or write, see readAndWrite function.

The coordinates whose elevations were not assigned could be checked with assignElevation. This function can download directly from Google Maps Elevation API[1]

Additional information at: https://developers.google.com/maps/documentation/elevation/#api_key

The headers of the input file must follow the Darwin Core standard [2]. The user can see the guide using data('ID_DarwinCore) command.

Value

A table data.frame class with coordinates and their respective elevation. A table with coordinates whose elevations were not assigned. A table as backup of the process.

Note

See: R-Alarcon V. and Miranda-Esquivel DR.(submitted) geocleaMT: An R package to cleaning geographical data from electronic biodatabases.

Author(s)

R-Alarcon Viviana and Miranda-Esquivel Daniel R.

References

[1] The Google Maps Elevation API. Available online at https://developers.google.com/maps/documentation/elevation/intro

[2] Wieczorek, J. et al. 2012. Darwin core: An evolving community-developed biodiversity data standard. PloS One 7: e29715.

See Also

assignElevation


Dmirandae/geocleaMT-1 documentation built on Nov. 18, 2019, 6:26 p.m.