Skip to contents

Checks whether longitude and latitude coincide with non-missing pixels of a raster. The function takes two arguments: points, a dataframe containing columns named longitude' and 'latitude', and mask is a raster. Returns a dataframe of longitude and latitude only those rows with points falling on non-missing pixels. If all points fall on missing pixels, the function throws an error.

Usage

inside_mask(points, mask)

Arguments

points

dataframe containing columns named 'longitude' and 'latitude'

mask

a raster

Value

dataframe of longitude and latitude only those rows with points falling on non-missing pixels. If all points fall on missing pixels, the function throws an error.