Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using ArcGIS 10.1.

I am searching for a solution to calculate a raster. The values are like: 0.2 0.6 5.3 i.e. How can I now get 0.2 as 0 and 0.6 to 1 and 5.3 to 5? In the end integer numbers. The "roundup" and "rounddown" functions are worse to do this.

Thanks for any hints.

Luigi

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Int(yourraster + 0.5) will round to the nearest integer.

share|improve this answer
    
Thanks. That is want I looked for. –  luigi Apr 29 '13 at 15:00
add comment

If you have multiple values to reclassify from a single raster then I suggest to use "arcpy.sa.Reclassify" tool. For example:

outras = arcpy.sa.Reclassify(inras,"Value",RemapValue([0.2,0],[0.6,1],[5.3,5]),"DATA")
share|improve this answer
    
Although this method is very flexible, it is much harder, more error-prone, and more time-consuming than Luke's answer. –  whuber Apr 29 '13 at 14:44
    
Not my solution. ;-) –  luigi Apr 29 '13 at 15:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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