Changes the data type of the input raster to the output type specified by the user.
If the input raster is of floating point type and the output type selected is "Byte"
Parameters
| Expression | Explanation |
|---|---|
| Function Name | ChangeRasterType |
| <input raster> | A String representing the input raster dataset. |
| <output raster> | A String - the full name of the output raster. |
| <output data type> | A String indicating the output data type. Valid inputs are: "Byte", "Short", "Unsignedshort", "Long", "Unsignedlong", "Single", "Double" |
ETSPath used in the table below is the full path to ETSRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETSurface\ETSRun.exe")
| Language | Syntax |
|---|---|
| Python | subprocess.call([ETSPath, "ChangeRasterType", "input raster", "output raster", "output data type"]) |
| .NET using ETSRun.exe | StartInfo.FileName = ETSPath StartInfo.Arguments = "ChangeRasterType" "input raster" "output raster" "output data type" |
| .NET using ETSOutX.dll | ChangeRasterType(input raster, output raster, output data type) |
| ArcPy | arcpy.ChangeRasterType("input raster", "output raster" , "output data type") |
Notes:
<> - required parameter
{} - optional parameter
The argument separator for StartInfo.Arguments is space. If a string might contain a space, you need to double quote it.