Skip to contents

A function that transform polygon to featurecollection.

Usage

pol_as_ee(x, id, simplify = 500)

Arguments

x

polygon sf object.

id

the main id name in sf object.

simplify

number to simplify the sf polygon keeping its topology

Value

feature collection

Examples

if (FALSE) {
library(tidyverse)
library(rgee)
library(innovar)
library(sf)
ee_Initialize()
# 1. Reading a sf object
data("Peru")
region <- Peru %>% filter(reg == 'LIMA')
region_ee <- pol_as_ee(region , id = 'distr' , simplify = 1000)
class(region_ee)
}