0

I'd like to reclassify raster using ModelBuilder based on the raster properties.

For example assign 0 to all values less than mean+2, and assign 1 to other values

enter image description here

I could do it manually by calculating the proper value, but for sure some of you know a better way to do it.

  • Use the reclassify tool. – Hornbydd Jan 31 at 16:39
  • That screen is from that tool, but I don't know how to automatically calculate threshold eg raster mean +2 – amikoma Jan 31 at 17:01
  • Look at the get raster properties tool if you want the mean. – Hornbydd Jan 31 at 17:54
  • I tried that, but still, don't know how to use parameter obtained from get raster properties tool in reclassify table – amikoma Jan 31 at 19:53
  • What does your test model so far look like? – PolyGeo Jan 31 at 23:11
1

As indicated in the comments, what you have to do is use Get Raster Properties. I am familiar with your problem of using the parameter obtained from this tool. Here you can find a similar solution with Raster Calculator. However, I find it simpler to use the Create Constant Raster tool to create constant rasters with their values equal to the mean and standard deviation of your input raster and then do calculations based on that:

enter image description here

There are two connectors from Input raster to Create Constant Raster, these are for the output extent and the output cell size. Then, the mean+ 2xStdev is calculated with Times and Plus for the rasters. Then, you can use a Greater than Equal (or Less than Equal, whichever you need) to yield the final thresholded raster.

Note that this is designed for a binary threshold as you describe.

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.