4

I have an integer raster created from an input floating point (LiDAR) raster by multiplying it by the (elevation) value of 100 (any other value higher would not work)

Thus, I can add a "double" attribute called elevation to this raster and calculate my real-world elevation by dividing the integer value field by 100. This gives me elevation attribute with 2 decimal places in this integer raster.

I would now like to add 2 more fields to this raster, namely X and Y. Unfortunately, calculate geometry is not an option. I can't think of any other way other than converting the raster to points then converting back to raster which can take a very long time with full resolution LiDAR rasters.

Ultimately I want to end up with an integer raster that also has X,Y,Z ("double") attributes for each cell.

Is this possible?

2
  • 1
    If you do a little research into the purpose of a raster attribute table, you'll see that it's a summary of the discrete values. It is certainly not possible to add coordinate values to each pixel via the RAT. Please edit your question to rewrite it to state what you have and ask for what you want (after first researching other questions and answers on the topic).
    – Vince
    Commented Nov 14, 2016 at 23:03
  • I posted a workaround here: gis.stackexchange.com/questions/217713/… Commented Nov 18, 2016 at 19:09

1 Answer 1

3

POSSIBLE WORKAROUND:

arcpy.gp.SingleOutputMapAlgebra_sa("$$ROWMAP", "d:/Scratch/ROWS", "")
arcpy.gp.SingleOutputMapAlgebra_sa("$$COLMAP", "d:/Scratch/COLS", "")
arcpy.gp.Combine_sa("ROWS;COLS", "D:/Scratch/COMBINE")
arcpy.gp.SingleOutputMapAlgebra_sa("$$XMap", "d:/Scratch/XGRID", "")
arcpy.gp.SingleOutputMapAlgebra_sa("$$YMap", "d:/Scratch/YGRID", "")
arcpy.gp.ZonalStatistics_sa("COMBINE", "VALUE", "dem", "...Scratch.gdb/ZSTAT", "MEAN", "DATA")

Add field (e.g. "Z") to COMBINE grid table and populate it by using join with statistics table. Repeat for XGRID and YGRID or any other grid of interest

This is screenshot of identify tool click on COMBINE grid:

enter image description here

NOTE:

By default combine tool can handle only 65,536 unique values (256 rows*256 columns).

You can increase this number by changing a setting in ArcGIS. On the main menu, select Customize > ArcMap Options. In the ArcMap Options dialog box, click the Raster tab and modify the Maximum number of unique values to display field to an appropriate value

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.