r-spatial / rgee

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

Creating areas of interest or vectorise on RGEE #276

Closed CvenTito closed 1 year ago

CvenTito commented 2 years ago

At submit an issue, please attached the following information of your rgee session:

library(rgee)

# Initialize the Earth Engine module.
ee_Initialize()

# Print metadata for a DEM dataset.
print(ee$Image('USGS/SRTMGL1_003')$getInfo())

Attach your Python (reticulate) configuration:

library(reticulate)
py_config()

python:         /usr/local/anaconda3/bin/python3.9
libpython:      /usr/local/anaconda3/lib/libpython3.9.dylib
pythonhome:     /usr/local/anaconda3:/usr/local/anaconda3
version:        3.9.12 (main, Apr  5 2022, 01:53:17)  [Clang 12.0.0 ]
numpy:          /usr/local/anaconda3/lib/python3.9/site-packages/numpy
numpy_version:  1.21.5
ee:             /usr/local/anaconda3/lib/python3.9/site-packages/ee

NOTE: Python version was forced by RETICULATE_PYTHON

Description

Dear all, I have just started with RGEE and I find it really great for those who are more familiar with the R language. However, I wanted to know if it is possible to create areas of interest, or vectorise a layer on the map such as points or surfaces as training areas for supervised classification directly in RStudio as it is done in the Google Earth Engine API. Thank you for your answers

zackarno commented 2 years ago

@CvenTito - you can try using the mapedit package. This allows you to interactively draw points and polygons. Once you are finished the drawing the polygons they become sf objects which can easily be converted to ee$FeatureCollections with rgee::sf_as_ee()