0

I am using the package rgee in R to process satellite data via GEE.

I have a Feature Collection: Counties<-ee$FeatureCollection('users/stephherbstritt/Counties')

And an image: corn16<-ee$Image('users/stephherbstritt/corn2016')

I filtered the Feature Collection to one county boundary.

AOI <- Counties$ filter( ee$Filter$eq( 'COUNTY_NAM', 'MONTOUR')) 

Then I clipped the AOI to the image. shp16<-corn16$clip(AOI)

Now I would like to convert the clipped image (shp16) to a feature so I can use it as the bound to filter the bounds of a request to get satellite data.

I tried:

 geometry = AOI, scale = 30, geometryType = "polygon", eightConnected = FALSE, labelProperty = "zone", reducer = ee$Reducer$count() )``` But I am getting an error when I try to map the result (test) to check it. ERROR: ``` Error in py_call_impl(callable, dots$args, dots$keywords) : EEException: Image.reduceToVectors: Need 1+1 bands for Reducer.count, image has 1.``` 

1 Answer 1

0

I ended up trying:

shp16a<-shp16$reduceToVectors( scale= 10, geometry= AOI, geometryType= 'polygon', maxPixels= 1e8) 

And it seems to work but later in the code, I exceed the EE user memory limit when I try to calculate the means of a band in my area. So I think there must be a better way to do this?

Error in py_call_impl(callable, dots$args, dots$keywords) : EEException: User memory limit exceeded. 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.