0

Say I have 2 rasters with same spatial extent and same resolution and same number of classes:

Raster 1: Ground Truth.

Raster 2: Result of some algorithm.

I want to see what % of pixels have same value. To achieve this I tried following in raster calculator

outras = Con("ras1.tif" = "ras2.tif", 1,0)

I am getting error:

Runtime error SyntaxError: keyword can't be an expression

2
  • How about subtracting one from the other and then check the histogram for the frequency of 0 value?
    – kowalski
    Mar 22, 2019 at 11:25
  • Replace = by ==
    – FelixIP
    Mar 22, 2019 at 20:11

1 Answer 1

0

Replace = by == – FelixIP

^ This works

Not the answer you're looking for? Browse other questions tagged or ask your own question.