Create Trade Area From Sub-geography Layer (Business Analyst)

Zusammenfassung

Generates trade areas from the features of an input polygon layer that intersects a defined boundary layer.

Learn more about how Create Trade Area From Subgeography Layer works

Verwendung

Syntax

CreateTAFromSubgeography_ba (InputBoundaryLayer, InputBoundaryLayerIdFieldName, All_Or_Single_Or_Selected, InputSubgeographyLayer, InputSubgeographyLayerIdFieldName, InputSubgeographyLayerNameFieldName, OutputFeatureClass, InputSubgeographyCalcRatiosOption, InputSubgeographySpatialRshipOption, {ByID_Or_ByName}, {Single_Site})
ParameterErläuterungDatentyp
InputBoundaryLayer

The input geography boundary layer used to define the geographies to extract.

Feature Layer
InputBoundaryLayerIdFieldName

The unique identifier for the boundary layer.

Field
All_Or_Single_Or_Selected

Creates trade areas for features in the boundary layer.

  • AllCreates trade areas for all features.
  • SingleCreates trade areas for a single feature.
  • SelectedCreates trade areas for all selected features in ArcMap.
String
InputSubgeographyLayer

The layer containing the features to be extracted as trade areas. In most cases, this will be a Business Analyst data layer, such as ZIP Codes.

Feature Layer
InputSubgeographyLayerIdFieldName

The unique ID field for the subgeography layer.

Field
InputSubgeographyLayerNameFieldName

The name field for the subgeography layer.

Field
OutputFeatureClass

The feature class that will contain the trade area features.

Feature Class
InputSubgeographyCalcRatiosOption

Generates a percentage based on how much each subgeography intersects the Boundary layer and appends these values to the subgeography layer.

  • All RatiosThe values calculated will contain percentages for Population, Housing Units, Households, and Business Points.
  • Area OnlyThe percentage will only be calculated for areas of the subgeographies that intersect the boundary layer.
  • NoneNo percentages will be calculated.
String
InputSubgeographySpatialRshipOption

Determines how the subgeography will be selected from the boundary layer.

  • IntersectIf any of the subgeography features touch or intersect the boundary layer, they will be included in output layer.
  • Centroid WithinIf the centroids of any of the subgeography features are contained within the boundary layer, they will be included in the output layer.
  • Completely WithinOnly the features of the subgeography layer that are completely contained within the boundary layer will be included in the output layer.
String
ByID_Or_ByName
(optional)

Field used to select a single feature.

  • IDSelects a single feature using the ID field.
  • NameSelects a single feature using the name field.
String
Single_Site
(optional)

ID or name of the feature used to select a single feature.

String

Codebeispiel

CreateTAFromSubgeography Example (Stand-alone Script)
# Name: CreateTAFromSubgeography.py
# Description: Selects all the block groups that intersect the input boundary layer exports them as a new layer.
# Author: ESRI

# Import system modules
import arcview
import arcpy

arcpy.ImportToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
try:
# Acquire extension license 
arcpy.CheckOutExtension("Business") 

arcpy.AddToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
# Define input and output parameters for the Create Trade Area From Subgeography Layer tool
Boundary = "C:/temp/TradeArea.shp"
InputGeo = "C:/Program Files/ArcGIS/Business Analyst/Data/BDS/esri_bg.bds"
OutPath = "C:/temp/Output_Geography.shp"
BoundaryId = "AREA_ID"
SubGeoId = "ID" 
SubGeoName = "NAME"
 
# Create Subgeography based trade areas
arcpy.CreateTAFromSubgeography_ba(sBoundary, sBoundaryId, "ALL", sInputGeo, sSubGeoId, sSubGeoName, sOutPath)
 
# Release extension license 
arcpy.CheckInExtension("Business") 
 
except:
  print arcpy.GetMessages(2)

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Verwandte Themen

Lizenzinformationen

ArcView: Erfordert Business Analyst
ArcEditor: Erfordert Business Analyst
ArcInfo: Erfordert Business Analyst

10/4/2010