AnsweredAssumed Answered

Euclidean Distance and Extent

Question asked by tonalca6864 on Jun 25, 2018
Latest reply on Jul 16, 2018 by tonalca6864

Hi,

 

I need to calculate some Euclidean Distances out of a list of FCs in a GDB.

I notice that when using an extent (in this case a global extent - see script) it does not work. It does work without specifying an extent but I do need to use one otherwise the resulting raster is a bit cut out at the edges.

When using the tool in ArcMap and specifying the extent in the Environments it does work.

 

Any help/suggestions will be greatly appreciated.

 

 

import arcpy
from arcpy import env
arcpy.env.overwriteOutput=True
from arcpy.sa import*
arcpy.CheckOutExtension("Spatial")

arcpy.env.extent = arcpy.Extent(-180.0, -90.0, 180.0, 90.0)

env.workspace = r"H:\OUTPUT.gdb"

fcdist = arcpy.ListFeatureClasses("")

for fc in fcdist:

    output = EucDistance(fc, 250000, 10000, "")
    output.save(env.workspace + "\\" + fc + "_250km")

Outcomes