function to check input type and projection. All input types convert to a SpatialPointsDataFrame for point elevation and bbx for raster.
loc_check(locations, prj = NULL)
Useful links