AnsweredAssumed Answered

Applying Symbology to layer through ArcPy script and values are getting changed?

Question asked by Rish18 on Mar 23, 2017
Latest reply on Mar 24, 2017 by Rish18

I am doing a raster calculation over a hdf file and after that i have to apply symbology on it.When i am applying Symbology to the raster layer through script .its values get changed as compared to the values i am geting when i am doing it manually . Symbology Type : Stretched

script i am using is as ...

 

import arcpy from arcpy.sa
import *env.workspace = "E:\data"arcpy.CheckOutExtension("Spatial")
in_layer ="E:\data\filename.hdf"
#raster calculation
output
= floatdivide(in_layer,10000)
# applying symbology
lyr ="output"symbolLyr = r"E:\data\Layer.lyr"
arcpy.ApplySymbologyFromLayer_management(lyr, symbolLyr)


Applying Script changes the topmost 3 values and changed it to the Min value ,Avg Value and Max Value , As Shown in Screen shot 1.. Max Value : 0.997 , Avg Value : 0.3985, Min Value :-0.2.

In Screen shot 2 we can see the first three values are changed.

we can see the first three values are changed.

Screenshot for Process by Arcpy Script

Screenshot for Manual Process


Outcomes