1

If I run the arcpy.Combine command as such:

result = arcpy.Combine(["CDL/raster07", "NHD/raster07", "OtherRaster"])

The resulting raster has an attribute table with fields

[f.name for f in arcpy.ListFields(result)
['OTHERRASTER', 'RASTER0701', 'RASTER0702']

The field order doesn't seem to correspond to the order in which the fields were input into the tool and they aren't descriptive in a way that I can automatically parse in a script. I'm also unable to rename the input rasters. Is there a way to control the field names, or to control the order in which they are written?

  • This sounds like a field mapping question. Check for field mapping resources for rasters / combine tool. --- Nevermind, did not find anything like this for the Combine tool in the docs -- desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/… – smiller Apr 17 at 19:56
  • How are you specifying the rasters to combine? ListRasters? If you inspect the result, does the field order follow the order in your list of raster inputs? (e.g. does it matter if you modify the input raster order?) – smiller Apr 17 at 19:59
  • The fields appear to not match the order in which I specified the rasters in the tool. I am specifying with a Python list of rasters (arcpy.Combine([raster_1, raster_2, raster_3]) – triphook Apr 17 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.