2

I'm trying to build a raster attribute table since my DEM file does not have one. But I can't because the file is using a floating point.

How do I convert the floating point into an integer?

I'm using the elevation data to do a least cost path analysis afterwards.

1

I think @ahmadhanb's answer is very solid. Alternatively you can also try the int tool as I assume that you have Spatial Analyst license. The tool will convert the floating point to integer for you.

1

If you want to open the attribute table of raster data, you need to convert the Pixel Type from floating point to signed integer. This can be done if you have Spatial Analyst extension.

With Spatial Analyst you can use Raster Calculator to convert the Pixel type from floating point to signed integer using the following formula:

Int(RoundDown("YourRasterImage"))     # You can use RoundUp() also, it is up to you

The raster data with a pixel type of floating point, the attribute table is not active:

enter image description here

After converting the pixel type to signed integer using the above formula, the attribute table becomes active:

enter image description here

Here is the attribute table:

enter image description here

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.