What is the 'OR' logic operator for images in RGEE

60 Views Asked by At

I want to transform this gee line

var reclassified=ee.Image(0).where(classifiedData.eq(7).or(classifiedData.eq(13))//.or(classifiedData.eq(10)), 1).rename('water').clip(studyArea);

to rgee as follows

 reclassified<-ee$Image(0)$where(classifiedData$eq(13)|(classifiedData$eq(7)),1)$rename('water')$clip(marigat_plains)

But I get an error :

operations are possible only for numeric, logical or complex types

1

There are 1 best solutions below

1
cven On

Have you tried with :

reclassified<-ee$Image(0)$where(classifiedData$eq(13)$Or(classifiedData$eq(7)),1)$rename('water')$clip(marigat_plains)

or your similar script

reclassified<-ee$Image(0)$where(classifiedData$eq(13)$Or(classifiedData$eq(7)),1)$rename('water')$clip(marigat_plains)