Skip to content

Commit

Permalink
updated get_vegetation
Browse files Browse the repository at this point in the history
  • Loading branch information
ambarja committed Oct 2, 2023
1 parent 45a2b3c commit 358a546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/get_vegetation.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ get_vegetation <- function(from, to, band, region, fun = "count", scale = 1000)

# Message of error

if (end_year < 1999 | start_year >= 2021) {
if (end_year < 1999 | start_year > 2024) {
print(sprintf("No exist data"))
}

# NDVI - EVI

if (band == "SAVI") {
collection <- ee$ImageCollection("MODIS/006/MOD13A1")$
collection <- ee$ImageCollection("MODIS/061/MOD13A1")$
select(c("sur_refl_b01", "sur_refl_b02", "DetailedQA"))
} else {
collection <- ee$ImageCollection("MODIS/006/MOD13A1")$
collection <- ee$ImageCollection("MODIS/061/MOD13A1")$
select(c(band, "DetailedQA"))
}

Expand Down

0 comments on commit 358a546

Please sign in to comment.