Victor Korir
Victor Korir

Reputation: 11

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

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

Upvotes: 1

Views: 66

Answers (1)

cven
cven

Reputation: 11

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)

Upvotes: 0

Related Questions