arcpy.Describe.PixelType returns useless value

210
0
12-03-2015 06:11 AM
Status: Open
DavidJames
New Contributor III
in a Python window in ArcGIS 10.3.1...using arcpy.Describe on a raster will yield an appropriate value for the raster format...'S32'...which stands for 32_BIT_SIGNED. The returned value is NOT a valid value for use in other commands, such as CopyRaster, which require the quoted string -- "32_BIT_SIGNED".  

Please...change Describe or change the commnads to honor the returned Describe value. Left hand, right hand, meet each other!


>>> PxT = arcpy.Describe("ec3m070802080201").PixelType

>>> PxT
u'S32'

>>> arcpy.CopyRaster_management("ec3m070802080201", "newRas", "","","","","",PxT)
    Runtime error  Traceback (most recent call last):   
    File "<string>", line 1, in <module>   
    File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", 
    line 12583, in CopyRaster raise e ExecuteError: ERROR 000800: 
      The value is not a member of 
       1_BIT | 2_BIT | 4_BIT | 8_BIT_UNSIGNED | 
       8_BIT_SIGNED | 16_BIT_UNSIGNED | 
       16_BIT_SIGNED | 32_BIT_UNSIGNED | 
       32_BIT_SIGNED | 32_BIT_FLOAT | 64_BIT.  

>>> arcpy.CopyRaster_management("ec3m070802080201", "newRas", "","","","","","32_BIT_SIGNED")
<Result 'D:\\Data\\ArcGISdefaults\\MyDefault.gdb\\newRas'>