Skip to content

Commit

Permalink
Landsat C1 is now deprecated on GEE, so updated function to work with C2
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-berner committed Aug 14, 2024
1 parent 6cbd287 commit 5cd04fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/lsat_get_pixel_centers.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ lsat_get_pixel_centers <- function(polygon_sf,
wrs_row <- as.numeric(gsub("[0-9]*_([0-9]*)", "\\1", wrs_tile_id))

# Access landsat8 image collection
ls8IC <- rgee::ee$ImageCollection("LANDSAT/LC08/C01/T1_SR")
ls8IC <- rgee::ee$ImageCollection("LANDSAT/LC08/C02/T1_L2")

# Retrieve tile crs from GEE
lsat_tile_crs <- ls8IC$
Expand Down Expand Up @@ -308,7 +308,7 @@ lsat_get_pixel_centers <- function(polygon_sf,
rgee::Map$centerObject(rgee::sf_as_ee(polygon_sf_utm))

# make map
region_map <- rgee::Map$addLayer(ls8_image$select("B4")) +
region_map <- rgee::Map$addLayer(ls8_image$select("SR_B4")) +
rgee::Map$addLayer(rgee::sf_as_ee(polygon_sf_buffered),
list(color = "blue")) +
rgee::Map$addLayer(rgee::sf_as_ee(polygon_sf_utm),
Expand Down

0 comments on commit 5cd04fa

Please sign in to comment.