1

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?

0

The issue was there was not .tif.aux.xml file in the same folder of the TIFF file. As a result, ArcGIS Server couldn't add the statistics. Including it fixed the issue!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.