rgee icon indicating copy to clipboard operation
rgee copied to clipboard

Creating areas of interest or vectorise on RGEE

Open CvenTito opened this issue 3 years ago • 1 comments

  • rgee version: 1.1.4
  • R version: 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
  • Operating System: macOS 12.4 Darwin 21.5.0

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

  • [x] You have the Python API installed (from terminal):
earthengine -h
  • [x] You can find the credentials file on your system:
library(rgee)
ee_path <- path.expand("~/.config/earthengine/credentials")
file.exists(ee_path)
  • [x] You can run a simple EE command from R:
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

CvenTito avatar Jul 21 '22 13:07 CvenTito

@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()

zackarno avatar Aug 22 '22 18:08 zackarno