<?xml version="1.0" encoding="UTF-8"?><metadata>
<Esri>
<CreaDate>20190626</CreaDate>
<CreaTime>14150400</CreaTime>
<ArcGISFormat>1.0</ArcGISFormat>
<SyncOnce>TRUE</SyncOnce>
<ModDate>20220128</ModDate>
<ModTime>124907</ModTime>
</Esri>
<dataIdInfo>
<idCitation>
<resTitle>CalculateDistance</resTitle>
<date>
<createDate>20190626</createDate>
</date>
</idCitation>
<idAbs>
<para>Calculates the Euclidean distance from a single source or set of sources.</para>
</idAbs>
<descKeys KeyTypCd="005">
<keyTyp>
<keyTyp>005</keyTyp>
</keyTyp>
<keyword>Distance</keyword>
<keyword>Distance</keyword>
<keyword>Allocation</keyword>
<keyword>Crow</keyword>
<keyword>Eucdistance</keyword>
<keyword>Euclidean</keyword>
<keyword>Source</keyword>
<keyword>Spread</keyword>
<keyword>Straight Line</keyword>
<keyword>Travel Cost</keyword>
</descKeys>
</dataIdInfo>
<distInfo>
<distributor>
<distorFormat>
<formatName>ArcToolbox Tool</formatName>
</distorFormat>
</distributor>
</distInfo>
<mdDateSt>20191009</mdDateSt>
<mdContact>
<rpOrgName>Environmental Systems Research Institute, Inc. (Esri)</rpOrgName>
<rpCntInfo>
<cntAddress>
<delPoint>380 New York Street</delPoint>
<city>Redlands</city>
<adminArea>California</adminArea>
<postCode>92373-8100</postCode>
<eMailAdd>info@esri.com</eMailAdd>
<country>United States</country>
</cntAddress>
<cntPhone>
<voiceNum>909-793-2853</voiceNum>
<faxNum>909-793-5953</faxNum>
</cntPhone>
<cntOnlineRes>
<linkage>http://www.esri.com</linkage>
</cntOnlineRes>
</rpCntInfo>
<role>
<RoleCd>007</RoleCd>
</role>
</mdContact>
<tool displayname="CalculateDistance" name="CalculateDistance" softwarerestriction="none" toolboxalias="rasteranalytics">
<summary>
<para>Calculates the Euclidean distance from a single source or set of sources.</para>
</summary>
<alink_name>CalculateDistance_ra</alink_name>
<toolIllust alt="Calculate Distance tool illustration" src="withheld" type="dialog"/>
<toolIllust alt="Calculate Distance tool illustration" src="withheld" type="illustration"/>
<parameters>
<param datatype="String" direction="Input" displayname="inputSourceRasterOrFeatures" expression="inputSourceRasterOrFeatures" name="inputSourceRasterOrFeatures" sync="true" type="Required">
<pythonReference>
<para>The layer that defines the sources to calculate the distance to. The layer can be image service or feature service.</para>
<para>For image service, the input type can be integer or floating point.</para>
<para>For feature service, the input can be point, line or polygon.</para>
</pythonReference>
<dialogReference>
<para>The layer that defines the sources to calculate the distance to. The layer can be image service or feature service.</para>
<para>For image service, the input type can be integer or floating point.</para>
<para>For feature service, the input can be point, line or polygon.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="outputDistanceName" expression="outputDistanceName" name="outputDistanceName" sync="true" type="Required">
<pythonReference>
<para>The name of the output distance raster service.</para>
</pythonReference>
<dialogReference>
<para>The name of the output distance raster service.</para>
</dialogReference>
</param>
<param datatype="Linear Unit" direction="Input" displayname="maximumDistance" expression="{maximumDistance}" name="maximumDistance" sync="true" type="Optional">
<pythonReference>
<para>The maximum distance to calculate out to.</para>
<para>The units can be Kilometers, Meters, Miles, Yards, or Feet.</para>
<para>The default units are Meters.</para>
</pythonReference>
<dialogReference>
<para>The maximum distance to calculate out to.</para>
<para>The units can be Kilometers, Meters, Miles, Yards, or Feet.</para>
<para>The default units are Meters.</para>
</dialogReference>
</param>
<param datatype="Linear Unit" direction="Input" displayname="outputCellSize" expression="{outputCellSize}" name="outputCellSize" sync="true" type="Optional">
<pythonReference>
<para>Set the cell size and units for the output raster.</para>
<para>The units can be Kilometers, Meters, Miles, Yards, or Feet.</para>
<para>The default units are Meters.</para>
</pythonReference>
<dialogReference>
<para>Set the cell size and units for the output raster.</para>
<para>The units can be Kilometers, Meters, Miles, Yards, or Feet.</para>
<para>The default units are Meters.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="outputDirectionName" expression="{outputDirectionName}" name="outputDirectionName" sync="true" type="Optional">
<pythonReference>
<para>The name of the output direction raster service.</para>
</pythonReference>
<dialogReference>
<para>The name of the output direction raster service.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="outputAllocationName" expression="{outputAllocationName}" name="outputAllocationName" sync="true" type="Optional">
<pythonReference>
<para>The name of the output allocation raster service.</para>
</pythonReference>
<dialogReference>
<para>The name of the output allocation raster service.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="allocationField" expression="{allocationField}" name="allocationField" sync="true" type="Optional">
<pythonReference>
<para>A field on the source input that holds the values that define each source. It must be of type integer.</para>
</pythonReference>
<dialogReference>
<para>A field on the source input that holds the values that define each source. It must be of type integer.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="distanceMethod" expression="{PLANAR | GEODESIC}" name="distanceMethod" sync="true" type="Optional">
<pythonReference>
<para>Specifies whether to calculate the distance using a planar (flat earth) or a geodesic (ellipsoid) method.</para>
<bulletList>
<bullet_item>Planar—The distance calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default.</bullet_item>
<bullet_item>Geodesic—The distance calculation will be performed on the ellipsoid. Therefore, regardless of input or output projection, the results do not change.</bullet_item>
</bulletList>
</pythonReference>
<dialogReference>
<para>Specifies whether to calculate the distance using a planar (flat earth) or a geodesic (ellipsoid) method.</para>
<bulletList>
<bullet_item>Planar—The distance calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default.</bullet_item>
<bullet_item>Geodesic—The distance calculation will be performed on the ellipsoid. Therefore, regardless of input or output projection, the results do not change.</bullet_item>
</bulletList>
</dialogReference>
<enumcorrespondence>
<enum label="Planar" name="Planar"/>
<enum label="Geodesic" name="Geodesic"/>
</enumcorrespondence>
</param>
<param datatype="String" direction="Input" displayname="inputBarrierRasterOrFeatures" expression="{inputBarrierRasterOrFeatures}" name="inputBarrierRasterOrFeatures" sync="true" type="Optional">
<pythonReference>
<para>Dataset that defines the barriers.</para>
<para>The barriers can be defined by an integer or floating point raster, or a feature layer.</para>
</pythonReference>
<dialogReference>
<para>Dataset that defines the barriers.</para>
<para>The barriers can be defined by an integer or floating point raster, or a feature layer.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="outputBackDirectionName" expression="{outputBackDirectionName}" name="outputBackDirectionName" sync="true" type="Optional">
<pythonReference>
<para>The name of the output back direction raster service.</para>
</pythonReference>
<dialogReference>
<para>The name of the output back direction raster service.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="context" expression="{context}" name="context" type="Optional"/>
</parameters>
<returnvalues/>
<environments>
<environment label="Cell size" name="cellSize"/>
<environment label="Output extent" name="extent"/>
<environment label="Mask" name="mask"/>
<environment label="Output coordinate system" name="outputCoordinateSystem"/>
<environment label="Snap raster" name="snapRaster"/>
</environments>
<usage>
<bullet_item>
<para>One example application of this tool is finding the distance from any location to the closest town.</para>
</bullet_item>
<bullet_item>
<para>The input source data can be a feature service, an image service or a portal item.</para>
</bullet_item>
<bullet_item>
<para>When the input source data is an image service, the set of source cells consists of all cells in the source raster that have valid values. Cells that have NoData values are not included in the source set. The value 0 is considered a legitimate source.</para>
</bullet_item>
<bullet_item>
<para>When the input source data is a feature service, the source locations are converted internally to a raster before performing the analysis. The resolution of the raster can be controlled with the Output cell size parameter or the Cell Size environment. By default, the resolution will be determined by the shorter of the width or height of the extent of input feature, in the input spatial reference, divided by 250.</para>
</bullet_item>
</usage>
<scriptExamples>
<scriptExample>
<title>CalculateDistance example 1 (Python window)</title>
<para>This example calculates the Euclidean distance from a single source.</para>
<code xml:space="preserve">import arcpy
arcpy.CalculateDistance_ra('https://MyPortal.esri.com/server/rest/services/Hosted/myPoints/FeatureServer/0',
"outDistance", "5000", "10", "outDirection", "outAllocation", "siting")
</code>
</scriptExample>
<scriptExample>
<title>CalculateDistance example 2 (stand-alone script)</title>
<para>This example calculates the Euclidean distance from a set of sources.</para>
<code xml:space="preserve"># Name: CalculateDistance_Ex_02.py
# Description: Calculates for each cell the Euclidean distance, direction and allocation
# to the nearest source.
# Requirements: ArcGIS Image Server
# Import system modules
import arcpy
# Set local variables
inSourceData = 'https://MyPortal.esri.com/server/rest/services/Hosted/reccenter/ImageServer'
outDistanceName = "eucdistance"
maxDistance = "4000"
cellSize = "10"
outDirectionName = "eucdirect"
outAllocationName = "eurallocation"
allocationField = "dataid"
# Execute EucDistance
arcpy.CalculateDistance_ra(inSourceData, outDistanceName, maxDistance, cellSize, outDirectionName,
outAllocationName, allocationField)
</code>
</scriptExample>
</scriptExamples>
<shortdesc>ArcGIS geoprocessing tool that calculates the Euclidean distance from a single source or set of sources.</shortdesc>
<arcToolboxHelpPath>withheld</arcToolboxHelpPath>
</tool>
</metadata>
