assignElevation: Assigning elevation data

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

View source: R/assignElevation.R

Description

Given a geographical coordinate (decimalLongitude/ decimalLatitude) the elevation data is assigned from an elevation database (Headers: decimalLongitude/ decimalLatitude/ elevation).

Usage

1
2
3
assignElevation(data = NULL, path.data = NULL, rd.frmt = "readRDS",
  elevations.db = NULL, round.coord = 1, wrt.frmt = "saveRDS",
  save.assigned.in = NULL, save.unassigned.in = NULL)

Arguments

data

Vector of characters. Name of the input file.

path.data

Vector of characters. Path to 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 a plain text file, using the 'readTXT' argument. See details.

elevations.db

Data.Frame object. The elevations database, tree columns (decimalLatitude, decimalLongitude, elevation).

round.coord

Numeric vector. Decimal to round the coordinate to assign the elevation. This value must be same of the coordinate resolution of database assigned as argument on elevation.db parameter. Example: the resolution of the coordinates in the databases assigned on elevation.db is one decimal, then round.coord must be equal to 1 (round.coord=1).

wrt.frmt

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

save.assigned.in

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

save.unassigned.in

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

Details

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

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

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 of information.

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

elevFromGg

readAndWrite


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