elevcheck: Elevation check

Description Usage Arguments Value Author(s) See Also Examples

View source: R/elevcheck.R

Description

Compares the recorded elevation values for records with values extracted from a digital elevation model and determines whether there is a mismatch in values.

Usage

1
elevcheck(dat, dem, elevc = "elevation", diff = 50)

Arguments

dat

A dataframe containing the required fields, including: ID, x, y, Species, x_original, y_original, Correction, Modified, Reason and Exclude. Required fields that are missing can be added using addmainfields.

dem

A digital elevation model as a raster object.

elevc

The field containing the recorded elevation (or depth) values in meters.

diff

A threshold value for determining a mismatch between the recorded elevation and the elevation extracted from the digital elevation model. If values exceed this value then they are flagged as being mismatches.

Value

A dataframe of two fields. Mismathes are indicated as ones in elevMismatch and the elevation values extracted from the digital elevation model are in demElevation.

Author(s)

Mark Robertson

See Also

errorcheck, quickclean

Examples

1
2
3
4
5
6
7
8
## Not run: 
gb <- keepmainfields(gbifdat,ID='',Species='species',x='decimallongitude',y='decimallatitude',
others=c('gbifid','elevation')) # Convert example data to biogeo format
gb <- gb[ gb$Species=='Heterotheca villosa', ] # Keep data for only one species
dem<-raster(dem,xmn=-180, xmx=180, ymn=-60, ymx=90)
gba<-elevcheck(gb,dem,elevc="elevation",diff=50)

## End(Not run)

biogeo documentation built on May 1, 2019, 8:05 p.m.