r-spatial / rgee

Google Earth Engine for R
https://r-spatial.github.io/rgee/
Other
677 stars 146 forks source link

`orbitProperties_pass` default for `ImageCollection("COPERNICUS/S1_GRD")` #303

Open Leprechault opened 1 year ago

Leprechault commented 1 year ago

Hi,

I don't invoke orbitProperties_pass in my code example below:

library(tidyverse)
library(rgee)
library(sf)
ee_Initialize(drive=TRUE)

# Define a Region of interest
roi <-ee$Geometry$Point(-52.19032,-30.25413)$buffer(500)

# Sentinel-1 dataset into the Earth Engine’s public data archive ------------              
s1 <- ee$ImageCollection("COPERNICUS/S1_GRD")$filter(ee$Filter$listContains("transmitterReceiverPolarisation", "VV"))$filter(ee$Filter$listContains("transmitterReceiverPolarisation","VH"))$filter(ee$Filter$eq("instrumentMode", "IW"))

# Radar vegetation index - RVI

RVI = function(img){
  img_band_selected <- img$expression(
    expression = '4*vh/(vv+vh)',
    opt_map =  list(
      'vv' = img$select('VV'),
      'vh' = img$select('VH')
    )
  )
  return(img_band_selected)
}

s1_roi  <- s1$filterBounds(roi)$filter(ee$Filter$date(as.character("2019-12-04"), as.character("2020-01-03")))$map(RVI)

#Extract average radar vegetation index (RVI) values 
ee_mean<- ee_extract(
  x = s1_roi,
  y = roi,
  scale = 10,
  fun = ee$Reducer$mean(),
  via = "drive"
)
ee_mean
  S1B_IW_GRDH_1SDV_20191210T084832_20191210T084857_019300_024710_A03C_constant
1                                                                     2.426008
  S1B_IW_GRDH_1SDV_20191222T084832_20191222T084857_019475_024CA1_193D_constant
1                                                                     2.434232

Work very well, but I don't know if the resulting ee_mean is DESCENDING or ASCENDING orbit. I try to find any help in the Sentinel-1 Algorithm in GEE documentation and the default is to download both, but the result is a single value.

Please, any help with it?