ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Create Trade Area From Geography Levels

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Generates trade areas based on standard geographic units.

Learn more about how Create Trade Area From Geography Levels works

Usage

  • The spatial reference of the output feature class will be the same as the input geography boundary layer.

  • Use the Append Fields From Geography Boundary to Output option to include the demographic data of an ESRI dataset in the output trade areas.

  • The Table Containing Matching Geography Fields must be in a format compatible with ArcMap. Your tabular data can be in the form of a database file format (.dbf) file, a comma- or tab-delimited text (.txt) file, or a relational database management system (RDBMS).

  • All nonmatching ZIP Codes will be excluded in the output trade area.

  • Nonmatching ZIP Codes are ZIP Code records in the Table Containing Matching Geography IDs that are not valid and do not have a corresponding feature in the input geography boundary layer.

  • If you want to select from a list of available geographic features to create a study area, you can use the Trade Area wizard in ArcMap. Selecting geographic features is not available as a geoprocessing tool.

  • In ArcMap, trade areas will only be created for features that are within the active study area or analysis extent.

Syntax

CreateTAFromGeographyLevels_ba ({Dissolve}, InputGeographyLevelLayer, InputGeographyLevelIdField, InputGeographyUnitsTable, InputGeographyUnitsIdField, {InputGeographyUnitsStoreIdField}, InputHandleDuplicateBehavior, OutputFeatureClass, {InputAppendVisibleFields})
ParameterExplanationData Type
Dissolve
(Optional)

This option dissolves the output based on the selected Store ID.

  • TRUE —Dissolves boundaries based on selected Store ID.
  • FALSE —Does not dissolves boundaries. This is the default.
Boolean
InputGeographyLevelLayer

The input feature class used to extract the trade area.

Feature Layer
InputGeographyLevelIdField

The unique identifier for the input geography layer.

Field
InputGeographyUnitsTable

The input table used to select the standard geography units that will define the trade area.

Table View
InputGeographyUnitsIdField

The associated geography ID field used to select the geographic units from the input geography boundary layer.

Field
InputGeographyUnitsStoreIdField
(Optional)

This field assigns the same standard geography units to several stores.

Field
InputHandleDuplicateBehavior

Allows you to filter duplicate fields in the table containing matching geographic IDs.

  • SUMMARIZE_FIELD —If a duplicate record exists, this option will summarize the duplicate fields if the Append Fields From Geography Boundary To Output Feature Class option is selected.
  • USE FIRST FEATURE —If a duplicate record exists, this option will choose the first record in the table. Any tabular data associated with that record can be appended to the output feature class. This option only appends the data of the first record and ignores any others.
String
OutputFeatureClass

The feature class that will contain the trade area features.

Feature Class
InputAppendVisibleFields
(Optional)

Appends the fields from the geography boundary to the output feature class.

  • TRUE —Appends fields to the output feature class.
  • FALSE —Does not append fields to the output feature class. This is the default.
Boolean

Code Sample

CreateTAFromGeographyLevels Example (Stand-alone Script)
# Name: CreateTAFromGeographyLevels.py
# Description: Automatically selects a set of ZIP Codes in San Francisco County from a list.
# Author: Esri

# Import system modules
import arcview
import arcpy
 
try:
# Acquire extension license 
  arcpy.CheckOutExtension("Business") 

  arcpy.AddToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.3\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
# Define input and output parameters for the Create Trade Area From Geography Levels tool
  InputGeo = "C:/ArcGIS/Business Analyst/US_2014/Data/Demographic Data/esri_zip5.bds"
  InputIds = "C:/temp/sf_custs.dbf"
  GeoId = "ID"
  Id = "ZIP"
  OutPath = "C:/temp/Output_Geography.shp"
 
# Create standard geography based trade areas
  arcpy.CreateTAFromGeographyLevels_ba(InputGeo, GeoId, InputIds, Id, "USE_FIRST_FEATURE", OutPath)
 
# Release extension license 
  arcpy.CheckInExtension("Business") 
 
except:
  print arcpy.GetMessages(2)

Environments

This tool does not use any geoprocessing environments

Licensing Information

  • ArcGIS for Desktop Basic: Requires Business Analyst
  • ArcGIS for Desktop Standard: Requires Business Analyst
  • ArcGIS for Desktop Advanced: Requires Business Analyst

Related Topics

  • An overview of the Trade Areas toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal