描述
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.
插图
使用方法
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.
许可:
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.
语法
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 (Euclidean distance) is the only valid option.
| 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 (可选) | The unit for Distance or time.
| String |
派生输出
名称 | 说明 | 数据类型 |
CollectionMemory |
代码示例
The following Python window script demonstrates how to use the EnrichLayer tool with only a data collection specified.
import arcpy
arcpy.EnrichLayer_analysis("Cities.shp", "C:/output/Cities_enriched.shp", "US",
"Age", "", "STRAIGHT_LINE", "3", "MILES")
The following Python window script demonstrates how to use the EnrichLayer tool with specific variables.
import arcpy
arcpy.EnrichLayer_analysis("Cities.shp", "C:/output/Cities_enriched.shp", "US",
"Age", ["Age.FEM20", "Age.FEM25"], "DRIVE_TIME",
"30", "MINUTES")
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.MakeFeatureLayer_management(businesses, "Restaurants_layer")
arcpy.MakeFeatureLayer_management(vacantSites, "Vacant_Sites_layer")
whereClause = "'SIC2' In (56,57,58)"
arcpy.SelectLayerByAttribute_management("Restaurants_layer", "NEW_SELECTION",
whereClause)
arcpy.SelectLayerByLocation_management("Vacant_Sites_layer", "WITHIN_A_DISTANCE",
"Restaurants_layer", "0.5 Miles")
# Get the population within 10 minutes to determine which site to pick
arcpy.EnrichLayer_analysis("Vacant_Sites_layer", "Enriched_Vacant_Sites.shp",
"US", "KeyUSFacts", ["KeyUSFacts.TOTPOP_CY"],
"DRIVE_TIME", "10", "MINUTES")
环境
许可信息
- Basic: 是
- Standard: 是
- Advanced: 是