Closed luisdiazc closed 3 years ago
Hi @luisdiazc thanks for open this issue, for visualization multiple layers with rgee is using the Map$addLayers()
function, however, is necessary to install rgeeExtra
. Here you can check more documentation :next_track_button: more info
Hi @ambarja, How can I access the names of the images (layers) within a imageColeection. Thank you, very much!
You can access to band names using the next code.
> S1RRVH$toBands()$bandNames()$getInfo()
[1] "S1B_IW_GRDH_1SDV_20210704T230850_20210704T230915_027650_034CD6_4D62_VH"
[2] "S1B_IW_GRDH_1SDV_20210716T230851_20210716T230916_027825_035204_8D8C_VH"
Great!
I triying use addLayers function for display a imageCollection, but jump the next error:
Map$centerObject(eeObject = RR, zoom = 9)
Map$addLayers(eeObject = RRS1RRVV)
Error: tentativa de aplicar una no-función
I installed the rgeeExtra package using remotes::install_github("r-earthengine/rgeeExtra")
and load with library(rgeeExtra)
.
Than you for you answers!
@luisdiazc here a reproducible example :arrow_down:
# Librerias
library(rgee)
library(rgeeExtra)
library(raster)
library(sf)
library(mapedit)
library(tidyverse)
ee_Initialize()
RR <- ee$Geometry$
Polygon(
list(
-70.05, -13.04,-69.93, -13.04,
-69.93, -12.90,-70.05, -12.90,
-70.05, -13.04
)
)
S1RRVV <- ee$ImageCollection('COPERNICUS/S1_GRD')$
filterBounds(RR)$
filter(ee$Filter$eq('instrumentMode', 'IW'))$
filter(ee$Filter$eq('orbitProperties_pass', 'ASCENDING'))$
filterMetadata('resolution_meters', 'equals', 10)$
filterDate('2021-07-01', '2021-07-22')$
select('VV')
Map$centerObject(eeObject = RR,zoom = 8)
Map$addLayers(eeObject = S1RRVV,visParams = list(min=-25,max=5))
@ambarja , I think that my problem is that R is not recognizing the Map $ addLayers method, therefore the error that I indicated before jumps🤔
Also, the comparison between layers with the operator |
does not work. I think that rgeeExtra
is bad installed.
Hi @luisdiazc you can update your rgee package with the dependencies and after to use the last code. If you have the same problem Would you mind attached us your sessionInfo?
sessionInfo()
Hi @ambarja , i managed to do it. Thank you very much for you suport. I consider this issue closed. Good bye🥳
I have consulted a collection of Sentinel 1 images for a specific ROI and a given time window. I want to visualize these one by one in the map view. I would appreciate some help on this as I am totally new to using rgee.