ReclassByTable

530
1
02-19-2014 01:22 PM
BrianBrokling
New Contributor
I am running a model, that uses re-class by table.  using a table  stored in a data base. I have my basic FROM ,TO, OUT,  MAPPING fields that have some values in it.  What I want to know if there is a way to fill in the last value so that it is equivalent to:
FROM= 5 and TO MAX_RasterValue, or FROM 5 to >5. 

The problem is that the max raster value is unknown therefore I can't know what to use for that value.  Is it possible to use a sentinel Value that exceeds the greatest raster value, or will that result in error.
for example: FROM = 5 TO = 999999999999
0 Kudos
1 Reply
MalcolmNunn
New Contributor II
I can't speak on using an arbitrary huge value (or ways to use open ended ranges) - can you just try it and see if throws an error?

I assume you are wanting to do this as part of an automated workflow, so simply checking the maximum value in the dataset properties is not desirable.

However one simple work around that comes to mind would be adding in the Con tool to produce an intermediate raster with a known maximum first. Then you can use that as the input raster for reclassification:

Con(ras1 > 5, 5, ras1)


The raster you feed in will have all values above 5 converted to 5, and all else will be as is, so your final range can be FROM 5 TO 5.
Simple to implement, however could add noticeable processing time if these are large datasets.

Alternatively you could use the Get Raster Properties tool to retrieve the maximum and then update the last FROM field prior to reclassifying, which would be much more efficient. I'm sure this would be simple enough, just not familiar enough with those tools to give an example off the top of my head.

Cheers
Malcolm
0 Kudos