Reclass from Integer to Floating point??

11903
8
10-20-2010 05:26 AM
AndreasZetterberg
New Contributor
How on earth do you reclass a raster from Integer values/ranges into floating point values?? The tools provided in spatial analyst (reclass, reclassify by etc...) work fine the other way around but I assume it's a pretty common problem to assign floating point values to different classes?? Can't find a way out... am I blind?
0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus
Float tool in the SA math toolset
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000008w000000.htm
or Float in the raster calculator
or "inraster" * 1.0
0 Kudos
AndreasZetterberg
New Contributor
Float tool in the SA math toolset
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000008w000000.htm
or Float in the raster calculator
or "inraster" * 1.0


Thanks for the tip. However, the problem is that I want to _reclassify_ a raster and not just convert the values into the floating point representation of the same value.

In short, I want to do some kind of "standard reclassify" using a reclassification table where for example raster value 1 is reclassified into 4.356, raster value 2 into 13.079 etc.
I'm currently playing around with the option of first joining the raster to a dbf-table and then using values from the joined raster but I find it kind of strange that you can't seem to use any of the standard ArcGIS-tools for reclassifying when the output values are supposed to be floating point values...
0 Kudos
DanPatterson_Retired
MVP Emeritus
So you want to do the reverse of what was proposed in this thread
http://forums.arcgis.com/threads/4126-using-RECLASS-in-Raster-calculator
if there is some numeric progression in the float values with respect to their integer counterparts, then you can recreate it using the raster
0 Kudos
AndreasZetterberg
New Contributor
I finally found out the way I imagine ESRI wants you to work. Using a regular integer raster, I could join it to a dbf-table with one column containing integers corresponding to the raster classes and a whole bunch of extra columns (for example floating points) corresponding to other attributes. I could then use the Spatial Analyst tool "Look up" where you simply chose which column you want to use and then produce and output raster with a single click 🙂

Best regards,
/Andreas
0 Kudos
LeThanh
New Contributor II
I finally found out the way I imagine ESRI wants you to work. Using a regular integer raster, I could join it to a dbf-table with one column containing integers corresponding to the raster classes and a whole bunch of extra columns (for example floating points) corresponding to other attributes. I could then use the Spatial Analyst tool "Look up" where you simply chose which column you want to use and then produce and output raster with a single click 🙂

Best regards,
/Andreas

Thanks for the tip that i'm looking for.
The output raster i have got is floating type indeed though in the help file, ESRI states that it always be the integer type. That makes me confused .
0 Kudos
DavidMrnustik
New Contributor
Thanks for the tip that i'm looking for.
The output raster i have got is floating type indeed though in the help file, ESRI states that it always be the integer type. That makes me confused .


Hi,

is there any option how to do a Spatial Analyst tool "Look up" operation from ArcGIS 10 in ArcView 3.2?
I have a grid with attributes and need to "extract" values from field (values from 0.75 till 1.38) to make a floating-point grid with these values.

I am a beginner in ArcView SW, I have tried a reclassify, map calculator, but with no success. It's possible in ArcView 3.2, is there some way how to do it?

Thanks in advance for any help.
0 Kudos
JeffreyEvans
Occasional Contributor III
You could use Float in conjunction with Con in the raster calculator and get your desired result in a single step. Good ol' raster algebra. 

Here is an example using a 4 value integer (21, 41, 42, 43) raster that results in a float with the values of 1.0, 2.0, 3.0, 4.0. 

Float(Con("nlcd" == 21, 1.0, Con("nlcd" == 41, 2.0, Con("nlcd" == 42, 3.0, Con("nlcd" ==  43, 4.0, 0.0)))))

The 0.0 value at the end represents the value that is assigned to values in the integer raster that are not accounted for in the Con statement (the "else" clause). So, if I had an integer raster with the values "0, 5, 21, 41, 42, 43" that I applied the above statement to, the 0 and 5 would be assigned a value of 0.
0 Kudos
DavidMrnustik
New Contributor
Thank you for response Mr. Evans,

If "nlcd" is a name of layer/raster and value integers represent "Value" field, there is a syntax error in my MC.

Probably my explanation of problem was not so clear. In fact solution seems very simple, Mr. Huber has explained it here:
http://gis.stackexchange.com/questions/20255/spatial-analyst-tool-look-up-but-in-arcview3-2



You could use Float in conjunction with Con in the raster calculator and get your desired result in a single step. Good ol' raster algebra. 

Here is an example using a 4 value integer (21, 41, 42, 43) raster that results in a float with the values of 1.0, 2.0, 3.0, 4.0. 

Float(Con("nlcd" == 21, 1.0, Con("nlcd" == 41, 2.0, Con("nlcd" == 42, 3.0, Con("nlcd" ==  43, 4.0, 0.0)))))

The 0.0 value at the end represents the value that is assigned to values in the integer raster that are not accounted for in the Con statement (the "else" clause). So, if I had an integer raster with the values "0, 5, 21, 41, 42, 43" that I applied the above statement to, the 0 and 5 would be assigned a value of 0.
0 Kudos