0

I have a raster whose values range from -1.4 to 1.4. I want to reclassify this to range only between -1 and 1. So all values less than -1 should get a value of -1 and all values greater than 1 should get a value of 1. All other pixels should have the values they had originally. Ive tried the Con tool but it doesnt work because it makes all other values as null and only gives me the pixels which the condition relates to. I want all other values to remain as they are.

Any ideas?

1

You can apply Con on two steps:

  1. In the first step, use the original image to convert the values less than -1 to -1 as follows:

    Con("Original_Image.tif"<-1,-1,"Original_Image.tif")
    
  2. The second step, use the output image from first step to convert the values more than 1 to 1 as follows:

    Con("Output.tif">1,1,"Output.tif")
    
  • That was easy and totally worked! Using the image itself as a value in the conditional statement didnt occur to me. Thank you! – Salman Jul 26 '17 at 9:03
  • You are welcome. Glad it worked. – ahmadhanb Jul 26 '17 at 9:03

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.