What is the equal of ArcGIS Raster calculator "Mod" function (Finds the remainder of the first raster when divided by the second raster on a cell-by-cell basis.) in r. mapcalc in GRASS GIS?


There is no function, but you can use the modulus operator, which is "%" in GRASS (as in many other languages), e.g. 8%5=3

for a pixel-by-pixel computation, simply use the layer names

  • This is what I would do in ArcGIS raster calculator: "tmp7 = Mod(((450 - (ATan2(tmp5, tmp6) * 57.296)) * 100), 36000) / 100". What would its equal be in GRASS GIS? I have tried "tmp7 = (((450 - (atan(tmp5@maria, tmp6@maria ) * 57.296)) * 100), 36000) %100 " but it gives a parse error. – Maria Karypidou Jun 20 '15 at 20:12
  • @marika That sounds like a new question so I think you should consider accepting this answer and asking a new question that includes the precise error message. – PolyGeo Jun 20 '15 at 20:51
  • @PolyGeo, thank you! Here I have began a new question: gis.stackexchange.com/questions/151693/… – Maria Karypidou Jun 20 '15 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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