3

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.

enter image description here

Screenshot for Process by Arcpy Script

enter image description here

Screenshot for Manual Process

enter image description here

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.