get_diff: Get Image Difference

View source: R/get.R

get_diffR Documentation

Get Image Difference

Description

This function allows the user to get differences by subtracting two images. Only works for one-band selections and from different time series.

Usage

get_diff(data, startDate2 = "2010-01-01", endDate2 = "2018-10-30", band = NULL)

Arguments

data

A previously create get_* object

startDate2

character format date, e.g. "1999-10-23". A second start date to use as the subtraction window.

endDate2

character format date, e.g. "1999-10-23". A second end date to use as the subtraction window.

band

A character indicating what bands/type to use when you have more than one. Can only select one, e.g. 'NDVI'.

Value

A list of Earth Engine Objects and arguments.

Examples

## Not run: 
# Load Libraries

library(rgee)
ee_Initialize()
library(exploreRGEE)

# Bring in data
huc <- exploreRGEE::huc

# get intitial image. Can by any get_*().

ld8 <- get_landsat(huc, method = 'ld8', startDate = '2014-01-01',
                  endDate = '2018-12-31', c.low = 6, c.high = 11)

# now subtract from new one

diff <- ld8 %>% get_diff(startDate2 = '2019-01-01', endDate2 = '2019-12-31', band = 'NDVI')

# now viz, rr, band, etc.

diff %>% viz(scale = 30)

## End(Not run)

joshualerickson/exploreRGEE documentation built on May 9, 2022, 10:33 p.m.