Locator Report (Business Analyst)

License Level:BasicStandardAdvanced

Summary

Generates a report based on the relation of stores to competitors.

Learn more about how Locator Report (Business Analyst) works

Usage

Syntax

LocatorReport_ba (InputFeatureLayer, IDField, NameFldName, BusinessLayer, IsLandscape, {FieldsToAppear}, {BarrierFeatureClasses}, {ReportFormats}, {All_Or_Single_Or_Selected}, {ByID_Or_ByName}, {Single_Site}, WayToSelectBusiness, {RadiusToSelectBusinesses}, {NumberOfBusinessesToSelect}, {DistanceCalculateMethod}, {AddDistanceToBusiness}, {WayToDefineDistanceField}, {DesireLinesDistanceField}, {NeedReportOutput}, {ReportTitle}, {ReportDir}, {NeedFeatureclassOutput}, {OutputFeatureClass})
ParameterExplanationData Type
InputFeatureLayer

The input feature class containing center points for the report. In most cases, this will be a Business Analyst store layer. Distances will be calculated from these points.

Feature Layer
IDField

Unique ID field in the center points (store) layer. Distances will be calculated from these points.

Field
NameFldName

Name field in the center points (store) layer. This field will be used in the report to group records for each center point (store).

Field
BusinessLayer

The input feature class containing points that will be listed in the report. Distances will be calculated from the center points (stores) to all points in this layer.

Feature Layer
IsLandscape

Locator Report page orientation.

  • LANDSCAPEGenerates a landscape-oriented report.
  • PORTRAITGenerates a portrait-oriented report.
String
FieldsToAppear
(Optional)

Headers and fields to appear in the report. The portrait report allows you to add four fields, and the landscape report allows up to six fields.

String
BarrierFeatureClasses
[BarrierFeatureClasses,...]
(Optional)

Allows a user to place point, line, or polygon barriers when using drive time or drive distance algorithms to calculate distances.

Feature Layer
ReportFormats
(Optional)

Select the desired report output format.

  • Simple XML
  • PDF
  • HTML
  • CSV
  • ZIP
  • XLSV
  • Stripped XLSX
String
All_Or_Single_Or_Selected
(Optional)

Creates trade areas for the points in the input feature layer.

  • AllReport is created for all store points.
  • SingleReport is created for a single store point.
  • SelectedReport is created for selected store points in ArcMap.
String
ByID_Or_ByName
(Optional)

Field used to select single point.

  • IDSelects single point using the store ID field.
  • NameSelects single point using the store name field.
String
Single_Site
(Optional)

ID or name of store to be used as the single point.

String
WayToSelectBusiness

Determines how the business locations will be selected in relation to the store layer.

  • LIMIT_WITHIN_DISTANCELimits the selected businesses to within a selected distance determined by straight-line distance (Euclidean), drive time, or drive distance. For example, you could list all business points within a three-mile radius of each store center point.
  • LIMIT_TO_NEAREST_LOCATIONSLimits the selected businesses based on a user-defined number determined by straight-line distance (Euclidean), drive time, or drive distance. For example, you could list the 10 closest locations to each store center point.
String
RadiusToSelectBusinesses
(Optional)

Determines the radius at which the business points will be selected when choosing the LIMIT_WITHIN_DISTANCE option from the Select Business Points parameter. For example, you could list all business points within a three-mile radius of each store center point.

Linear unit
NumberOfBusinessesToSelect
(Optional)

Determines the number of points selected from business points when choosing the LIMIT_TO_NEAREST_LOCATIONS option from the Select Business Points parameter. For example, you could list the 10 closest locations to each store center point.

Long
DistanceCalculateMethod
(Optional)

Defines the approach to determine the distance from the store layer to the business points layer.

  • DRIVE_DISTANCECalculates distance based on driving distance.
  • DRIVE_TIMECalculates distance based on drive time.
  • STRAIGHT_LINE_DISTANCECalculates distance based on Euclidean straight-line distance.
String
AddDistanceToBusiness
(Optional)

Optionally adds an attribute field back to the business points layer that will store the distance from the store center point to each feature in the business points layer.

  • ADD_DISTANCEAdds the distance calculation to each record in the business points layer.
  • DONT_ADD_DISTANCEDoes not add the distance field to the business points layer. This is the default.
Boolean
WayToDefineDistanceField
(Optional)

Determines the method for storing the distance calculation in the business points layer.

  • CREATE_NEWCreates a new field and appends the distance calculation to this field. This is the default.
  • USE_EXISTINGOverwrites an existing field and appends the distance calculation to this field. This operation cannot be undone.
Boolean
DesireLinesDistanceField
(Optional)

Name of the distance field.

String
NeedReportOutput
(Optional)

Option to generate a report or append the distance calculation to the business points layer.

  • CREATE_REPORTOutputs the locator report to a report file.
  • DONT CREATE REPORTNo report is generated. This is the default.
Boolean
ReportTitle
(Optional)

Title for the locator report.

String
ReportDir
(Optional)

The output directory that will contain the report.

Folder
NeedFeatureclassOutput
(Optional)

Generates a new feature class of all the business points used in the report.

  • CREATE_OUT_FEATURECLASSGenerates an output feature class.
  • DONT_CREATE_OUT_FEATURECLASSDoes not generate an output feature class. This is the default.
Boolean
OutputFeatureClass
(Optional)

The output feature class that will contain the business point features used in the report.

Feature Class

Code Sample

LocatorReport Example (Stand-alone Script)
# Name: LocatorReport.py
# Description: Outputs a proximity report displaying the closest 25 customers to each store.
# Author: Esri

# Import system modules
import arcview
import arcpy

arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")

try:
# Acquire extension license 
  arcpy.CheckOutExtension("Business") 
 
# Define input and output parameters for the Locator Report tool

  Store= "C:/temp/sf_stores.shp"
  ID = "STORE_ID"
  Name = "NAME"
  Cust = "C:/temp/sf_cust.shp"
  Flds = "Name:NAME;ZIP:ZIP;City:City_std;State:State_std"
  Rpt = "C:/My Output Data/Projects/Default Project/Reports/Locator/Locator.rpt"
  Title = "Customer Proximity Report"
  NumCust = 25
 
# Create a Locator Report

  arcpy.LocatorReport_ba(Store, ID, Name, Cust, Flds, "PORTRAIT", "All", "#", "#", "LIMIT_TO_NEAREST_LOCATIONS", "5 miles", NumCust, "STRAIGHT_LINE_DISTANCE", "DONT_ADD_DISTANCE", "USE_EXISTING","#", "CREATE_REPORT", Title, Rpt, "DONT_CREATE_OUT_FEATURECLASS")
 
# Release extension license 
  arcpy.CheckInExtension("Business")
 
except:
  print arcpy.GetMessages(2)

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires Business Analyst
ArcGIS for Desktop Standard: Requires Business Analyst
ArcGIS for Desktop Advanced: Requires Business Analyst
3/3/2014