I am trying to publish an image as a service using python in ArcGIS 10.5. Everything works except that the published imageserver has no statistics especially minimum and maximum. However, imageserver published from ArcGIS Desktop has statistics.
Below is my python code.
arcpy.CreateImageSDDraft(img_path, sd_draft, service, 'FROM_CONNECTION_FILE ', con, True, 'targeting_tools', "User uploaded image service.", "user,image service") # Set local variables out_service_definition = os.path.join(upload_path, service + ".sd") # Execute StageService arcpy.StageService_server(sd_draft, out_service_definition) # Set local variables arcpy.UploadServiceDefinition_server(out_service_definition, con)
ImageServer created has no minimum and maximum pixel values or any other statistics. Is there a way to fix this?