Hey,
I am using ArcGIS Pro 2.5.1 and try to scale the CellSize of an image from 1 to a value of ~0.48 using arcpy.Rescale_management.
The Rescale - Data Management Tool in ArcGIS Pro works correctly for this use case
When trying to use the rescaling function in Python I get the following exception
If I export the function called in ArcGIS Pro as a Python script, the exact same function is called with identical parameters. Is there a bug in ArcGIS/ArcPy?
Edit:
It seems that only integer values are accepted or the decimal places are cut off.
1.488.. -> = scaling by factor 1, no Exception
0.488.. -> = 0?
Solved! Go to Solution.
From
Rescale—Data Management toolbox | Documentation
you will notice in the examples that they pass the numeric value as a string rather than a number
ie " 0.488 "
in your case. This is indeed strange
From
Rescale—Data Management toolbox | Documentation
you will notice in the examples that they pass the numeric value as a string rather than a number
ie " 0.488 "
in your case. This is indeed strange
Thank you, actually works.
Alternative solution:
I had to make a format adjustment in Windows. After I changed the decimal separator from "." to "," everything works like in the code snippet above, with double values instead of strings.