0

I'm trying to call Euclidean Distance in an arcpy script within a toolbox. I've used arcpy.sa.EucDistance but the output raster is a Euclidean Direction raster. When I run it in the python dialog, it works as intended and when I run the tool Euclidean Distance tool it works normally.

Does anyone have an idea of what's going on? relevant code below.

import arcpy
from arcpy.sa import *

lines = r"C:\shapes\Lines.shp
output = r"C:\rasters\EucDistLines.tif"

EucDist = arcpy.sa.EucDistance(lines, 6000, 3, output)
  • 1
    Edit your question to show what the parameters are, as the code looks OK to me which suggests its the inputs that may be odd? – Hornbydd Jul 6 '17 at 18:18
  • Discovered that it was functioning correction. I just needed to do a EucDist.save to get the final file saved as the output for some reason is the intermediary files. – NorthLand Jul 6 '17 at 18:38
1

Requires EucDist.save(output) after process. Otherwise, the output is Intermediary files.

import arcpy
from arcpy.sa import *

lines = r"C:\shapes\Lines.shp"
output = r"C:\rasters\EucDistLines.tif"

EucDist = arcpy.sa.EucDistance(lines, 6000, 3, output)
EucDist.save(output)

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.