Enrich Layer (分析)

摘要

Enriches your data by adding demographic and landscape facts about the people and places that surround or are inside your data locations. The output is a duplicate of your input with new attribute fields added to the table. This tool requires an ArcGIS Online organizational account and consumes credits.

旧版本:

This is a deprecated tool. This functionality has been replaced by the Enrich tool.

插图

Geoenrichment

使用情况

    许可:

    To use the Enrich Layer tool, you must be logged in to an ArcGIS Online organization account. Each time the tool runs successfully, service credits are debited from your subscription based on the service used and the results returned from the service. Refer to the ArcGIS Online credit estimator for an estimate of the service credits consumed by this tool.

  • When the input features are points or lines, you must specify a Define areas to enrich option (buffer_type option in Python) to make straight-line buffer, driving time, or walking-time areas around the features to enrich. The output feature class will be the same geometry as the input but will represent the enriched characteristics of the area specified. For example, if your input is points, the output will also be points, but an enriched output field such as Median household income will represent an area around those points, not a value at the specific point.

  • When using Enrich Layer from the tool dialog box, the Country, Data Collection, and Variables parameters must be entered sequentially. You must select a country to see data collections, and you must select a data collection to see variables.

  • You can select variables from multiple data collections by first selecting a set of variables from one collection; then select a different data collection and select another set of variables from the new collection.

  • You can run this tool with only a data collection specified and no variables selected to get all variables in the collection.

  • This tool creates a new output feature class, which is a copy of the input with additional attributes added. The existing feature geometries and attribute fields and values will not be changed.

参数

标注说明数据类型
Input Features

The features to enrich with new data.

Feature Layer
Output Feature Class

The output feature class, which is a copy of the input features with new attribute fields added.

Feature Class
Country

The country whose data collections and variables are used to enrich the input. You can use the Global country code to obtain enriched data from anywhere in the world. Global can also be used when you have input features that are in more than one country.

String
Data Collection

The collection of data used to enrich the input. You can specify a data collection without selecting any variables to enrich your data with all variables included in that collection. The Global country code only includes one data collection, KeyGlobalFacts.

String
Variables
(可选)

The specific variables used to enrich the input. Variables can be from one or multiple data collections.

String
Define areas to enrich
(可选)

If the input features are points, you must define an area around them to enrich from one of the following seven types. If the input features are lines, Straight line (Euclidean distance) is the only valid option.

  • Straight line (Euclidean distance)Straight-line or Euclidean distance is used as the distance measure.
  • Driving timeDriving time is used as the distance measure. Current posted speed limits, one-way streets, and turn restrictions affect driving time.
  • Driving distanceDriving distance is used as the distance measure. One-way streets and turn restrictions affect driving distance.
  • Trucking timeTrucking time is used as the distance measure. Current posted speed limits, one-way streets, and turn restrictions affect trucking time. This option is similar to Driving time, but travel can only occur on roads that are suitable for trucks.
  • Trucking distanceTrucking distance is used as the distance measure. One-way streets and turn restrictions affect trucking distance. This option is similar to Driving distance, but travel can only occur on roads that are suitable for trucks.
  • Walking timeWalking time is used as the distance measure. Measurements are made using a walking speed of 5 KPH (3.1 MPH). Travel is allowed where pedestrians are allowed, such as trails, but not on limited-access highways.
  • Walking distanceWalking distance is used as the distance measure. Travel is allowed where pedestrians are allowed, such as trails, but not on limited-access highways.
String
Distance or time
(可选)

The value that determines the straight-line distance or drive time around the input features for areas to enrich. The unit of the distance or time should be supplied in the Unit parameter.

Double
Unit
(可选)

Specifies the unit for Distance or time parameter value.

  • MilesMiles
  • YardsYards
  • FeetFeet
  • KilometersKilometers
  • MetersMeters
  • HoursHours
  • MinutesMinutes
  • SecondsSeconds
String

派生输出

标注说明数据类型
Temporary data used for tool execution

String

arcpy.analysis.EnrichLayer(in_features, out_feature_class, country, data_collection, {variables}, {buffer_type}, {distance}, {unit})
名称说明数据类型
in_features

The features to enrich with new data.

Feature Layer
out_feature_class

The output feature class, which is a copy of the input features with new attribute fields added.

Feature Class
country

The country whose data collections and variables are used to enrich the input. You can use the Global country code to obtain enriched data from anywhere in the world. Global can also be used when you have input features that are in more than one country.

You can specify the value that is used in the tool dialog box, such as Canada (CA), or you can use the two-character country code, such as CA.

String
data_collection

The collection of data used to enrich the input. You can specify a data collection without selecting any variables to enrich your data with all variables included in that collection. The Global country code only includes one data collection, KeyGlobalFacts.

You can use a value such as Health & Personal Care (HealthPersonalCare), or you can use the collection name HealthPersonalCare. See the Esri Demographics site for more information on data collections and their variables.

String
variables
[variables,...]
(可选)

The specific variables used to enrich the input. Variables can be from one or multiple data collections.

Variables should be entered in a Python list. You can use a value such as 2013 Total$: Health care (HealthPersonalCare.THS148), or you can use the collection name and variable name HealthPersonalCare.THS148. See the Esri Demographics site for more information on data collections and their variables.

String
buffer_type
(可选)

If the input features are points, you must define an area around them to enrich from one of the following seven types. If the input features are lines, STRAIGHT_LINE is the only valid option.

  • STRAIGHT_LINEStraight-line or Euclidean distance is used as the distance measure.
  • DRIVE_TIMEDriving time is used as the distance measure. Current posted speed limits, one-way streets, and turn restrictions affect driving time.
  • DRIVING_DISTANCEDriving distance is used as the distance measure. One-way streets and turn restrictions affect driving distance.
  • TRUCKING_TIMETrucking time is used as the distance measure. Current posted speed limits, one-way streets, and turn restrictions affect trucking time. This option is similar to Driving time, but travel can only occur on roads that are suitable for trucks.
  • TRUCKING_DISTANCETrucking distance is used as the distance measure. One-way streets and turn restrictions affect trucking distance. This option is similar to Driving distance, but travel can only occur on roads that are suitable for trucks.
  • WALKING_TIMEWalking time is used as the distance measure. Measurements are made using a walking speed of 5 KPH (3.1 MPH). Travel is allowed where pedestrians are allowed, such as trails, but not on limited-access highways.
  • WALKING_DISTANCEWalking distance is used as the distance measure. Travel is allowed where pedestrians are allowed, such as trails, but not on limited-access highways.
String
distance
(可选)

The value that determines the straight-line distance or drive time around the input features for areas to enrich. The unit of the distance or time should be supplied in the unit parameter.

Double
unit
(可选)

Specifies the unit for distance parameter value.

  • MILESMiles
  • YARDSYards
  • FEETFeet
  • KILOMETERSKilometers
  • METERSMeters
  • HOURSHours
  • MINUTESMinutes
  • SECONDSSeconds
String

派生输出

名称说明数据类型
CollectionMemory

String

代码示例

EnrichLayer example 1 (Python window)

The following Python window script demonstrates how to use the EnrichLayer function with only a data collection specified.

import arcpy
arcpy.analysis.EnrichLayer("Cities.shp", "C:/output/Cities_enriched.shp", "US", 
                           "Age", "", "STRAIGHT_LINE", "3", "MILES")
EnrichLayer example 2 (Python window)

The following Python window script demonstrates how to use the EnrichLayer function with specific variables.

import arcpy
arcpy.analysis.EnrichLayer("Cities.shp", "C:/output/Cities_enriched.shp", "US", 
                           "Age", ["Age.FEM20", "Age.FEM25"], "DRIVE_TIME", 
                           "30", "MINUTES")
EnrichLayer example 3 (stand-alone script)

Find the population within a 10-minute drive time of a number of proposed mixed-use development sites.

import arcpy

# Set environments
arcpy.env.workspace = "c:/data"

# Select a vacant site that is within 0.5 miles of existing restaurants and bars
businesses = "City_businesses.shp"
vacantSites = "Vacant.shp"
arcpy.management.MakeFeatureLayer(businesses, "Restaurants_layer")
arcpy.management.MakeFeatureLayer(vacantSites, "Vacant_Sites_layer")

whereClause = "'SIC2' In (56,57,58)"
arcpy.management.SelectLayerByAttribute("Restaurants_layer", "NEW_SELECTION", 
                                        whereClause)

arcpy.management.SelectLayerByLocation("Vacant_Sites_layer", "WITHIN_A_DISTANCE", 
                                       "Restaurants_layer", "0.5 Miles")

# Get the population within 10 minutes to determine which site to pick
arcpy.analysis.EnrichLayer("Vacant_Sites_layer", "Enriched_Vacant_Sites.shp", 
                           "US", "KeyUSFacts", ["KeyUSFacts.TOTPOP_CY"], 
                           "DRIVE_TIME", "10", "MINUTES")

许可信息

  • Basic: 是
  • Standard: 是
  • Advanced: 是