markwhilesumle,markwhilesumge¶
Result = markwhilesumle(expression1, expression2, limit)
Result = markwhilesumge(expression1, expression2, limit)
- expression1
ordinal, spatial
- expression2
scalar, spatial, non spatial
- limit
scalar, non spatial
- Result
boolean, spatial
Operation¶
Each cell of expression2 is summed in the order specified by the ascending ordinal values in expression1 while the sum of the cells in expression2 is less or equal than limit for markwhilesumle, or greater or equal than limit for markwhilesumge. Result is a boolean map where every cell that matches the condition is marked 1 (True) or 0 (False) otherwise.
Notes¶
Missing values in expression1 or expression2 will return missing values in Result. expression1 should have an ascending order with no multiple instances of the same number.
Examples¶
- • pcrcalcbindingResult2 = Result2.map;Expr1 = Expr1.map;Expr = Expr.map;initialreport Result2 = markwhilesumge(Expr1, scalar(Expr), 40);• pythonExpr1 = readmap(“Expr1.map”)Expr = readmap(“Expr.map”)Result2 = markwhilesumge(Expr1, scalar(Expr), 40)
Result2.map
Expr1.map
Expr.map
- • pcrcalcbindingResult1 = Result1.map;Expr1 = Expr1.map;Expr = Expr.map;initialreport Result1 = markwhilesumle(Expr1, scalar(Expr), 40);• pythonExpr1 = readmap(“Expr1.map”)Expr = readmap(“Expr.map”)Result1 = markwhilesumle(Expr1, scalar(Expr), 40)
Result1.map
Expr1.map
Expr.map