Measure Cannibalization (Business Analyst)
Resumen
Calculates the amount of overlap between two or more trade areas.
Ilustración
|  | 
Uso
- 
				The spatial reference of the output feature class will be the same as the trade area layer. 
- 
				The trade area layer must be a polygon feature class. 
- 
				This tool is primarily used to examine the amount of overlap between two or more trade areas. 
- 
				In most cases, the trade area layers will be trade areas created with ESRI Business Analyst. 
- 
				Only overlapping trade areas are valid inputs for this tool. 
- 
				The output feature class is created from the actual area of overlap in the trade area features. 
- 
				If trade areas do not overlap, the output feature class will be the same trade area input feature class. 
Sintaxis
| Parámetro | Explicación | Tipo de datos | 
| InputLayer | The input feature class containing the trade areas used to determine amount of cannibalization. | Feature Layer | 
| IDField | Unique ID field in the trade area layer. | Field | 
| NameField | Unique name field in the trade area layer. | Field | 
| OutputFeatureClass | The output feature class that will contain the overlapped features. | Feature Class | 
| UseSelectedFeatures (Opcional) | The features used to measure cannibalization. 
 | Boolean | 
| ReportName (Opcional) | Name of the report. | String | 
| ReportTitle (Opcional) | Title of the report. | String | 
| ReportOutputDirectory (Opcional) | Report is created in this output folder. | Folder | 
| ReportFormats (Opcional) | One or more formats to which the report will be output. 
 | String | 
Ejemplo de código
# Name: MeasureCannibalization.py
# Description: Measures cannibalization between two trade areas.
# Author: ESRI
# Import system modules
import arcview
import arcpy
arcpy.AddToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
try:
# Acquire extension license 
  arcpy.CheckOutExtension("Business") 
 
# Define input and output parameters for the Measure Cannibalization tool
  TradeArea = "C:/temp/DetailedCustomerTA.shp"
  Id = "AREA_ID"
  Name = "AREA_DESC"
  Output = "C:/temp/Reports/Cannibalization.shp"
  ReportName = "Cannibalization_Name"
  ReportTitle = "Cannibalization_Report"
  ReportOutput = "C:/temp/Reports"
 
# Create a Measure Cannibalization output
  arcpy.MeasureCannibalization_ba(sTradeArea, sId, sName, sOutput, "false", sReportName, sReportTitle, sReportOutput)
 
# Release extension license   
  arcpy.CheckInExtension("Business") 
 
except:
  print arcpy.GetMessages(2)