Generate Grids and Hexagons (Business Analyst)

获得 Business Analyst 许可后可用。

摘要

Creates features with vector-based square grid cells, hexagons, or H3 hexagons for a given area.

使用情况

  • Hexagons are preferable when the analysis includes aspects of connectivity or movement paths and to reduce sampling bias due to the edge effects of the grid shape.

  • When the Cell Geometry Type parameter value is set to H3 Hexagon, the Cell Size parameter will become inactive, and the H3 Resolution parameter will become active.

  • When the Enrichment Type parameter value is set to Enrich Cell, the Buffer and Network Parameters categories will become inactive.

  • When the Distance Type parameter value is set to Straight Line, the Network Parameters category will become inactive.

  • The output feature class inherits the coordinate system of the Area of Interest parameter value by default. You can override this by specifying the Output Coordinate System environment setting.

参数

标注说明数据类型
Area of Interest

The input feature class used to define the extent of the grid or hexagon layer.

Feature Layer
Output Feature Class

The feature class that will contain the grid or hexagon features.

Feature Class
Cell Geometry Type
(可选)

Specifies the cell type that will be created in the output.

  • SquareRegular four-sided polygons with equal side lengths will be created. This is the default.
  • HexagonRegular six-sided polygons with equal side lengths will be created.
  • H3 HexagonRegular six-sided polygons with equal side lengths based on Uber's hexagonal hierarchical spatial index will be created.
String
Enrichment Type
(可选)

Specifies the method that will be used for variable enrichment.

  • Enrich CellEnrichment will be performed on the Cell Geometry Type parameter value.
  • Enrich BufferEnrichment will be performed on a buffer around the centroid of the grid or hexagon.
String
Cell Size
(可选)

The size of the cell to generate squares or hexagons. The default value is 1 square mile.

Areal Unit
H3 Resolution
(可选)

The resolution that will be used to generate the H3 hexagons. A value of 15 represents the finest resolution. The default value is 7.

Long
Variables
(可选)

A list of variables that will be appended to the output.

String
Distance Type
(可选)

The method of travel that will be used for the buffer calculation.

String
Distance
(可选)

The distance that will be used for the buffer calculations.

Double
Distance Units
(可选)

The units that will be used for the Distance parameter.

String
Output Enriched Buffers
(可选)

The feature class that will contain the enriched buffers.

Feature Class
Travel Direction
(可选)

Specifies the direction of travel that will be used between the center of the cell and the buffer boundary.

  • Toward Input FeaturesThe direction of travel will be from location points to input features. This is the default.
  • Away from Input FeaturesThe direction of travel will be from input features to location points.
String
Time of Day
(可选)

The time at which the travel will begin.

Date
Time Zone
(可选)

Specifies the time zone that will be used for the Time of Day parameter.

  • UTCCoordinated universal time (UTC) will be used. Choose this option if you want the best location for a specific time, such as now, but aren't certain of the time zone.
  • Local time at locationsThe time zone in which the Area of Interest value is located will be used. This is the default.
String
Search Tolerance
(可选)

The maximum distance that input points can be from the network. Points located beyond the search tolerance will be excluded from processing.

Linear Unit
Polygon Detail
(可选)

Specifies the level of detail that will be used for the output drive time polygons.

  • StandardThe optimal setting that combines processing speed with overall accuracy will be used. This is the default.
  • GeneralizedThe fastest method will be used.
  • HighThe highest level of detail will be used.
String
Centroids Output Feature Class
(可选)

The feature class that will contain the cell centroids.

Feature Class

arcpy.ba.GenerateGridsAndHexagons(area_of_interest, out_feature_class, {cell_type}, {enrich_type}, {cell_size}, {h3_resolution}, {variables}, {distance_type}, {distance}, {units}, {out_enriched_buffers}, {travel_direction}, {time_of_day}, {time_zone}, {search_tolerance}, {polygon_detail}, {out_centroids})
名称说明数据类型
area_of_interest

The input feature class used to define the extent of the grid or hexagon layer.

Feature Layer
out_feature_class

The feature class that will contain the grid or hexagon features.

Feature Class
cell_type
(可选)

Specifies the cell type that will be created in the output.

  • SQUARERegular four-sided polygons with equal side lengths will be created. This is the default.
  • HEXAGONRegular six-sided polygons with equal side lengths will be created.
  • H3_HEXAGONRegular six-sided polygons with equal side lengths based on Uber's hexagonal hierarchical spatial index will be created.
String
enrich_type
(可选)

Specifies the method that will be used for variable enrichment.

  • ENRICH_CELLEnrichment will be performed on the cell_type parameter value.
  • ENRICH_BUFFEREnrichment will be performed on a buffer around the centroid of the grid or hexagon. The default distance_type parameter value is straight_line.
String
cell_size
(可选)

The size of the cell to generate squares or hexagons. The default value is 1 square mile.

Areal Unit
h3_resolution
(可选)

The resolution that will be used to generate the H3 hexagons. A value of 15 represents the finest resolution. The default value is 7.

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

A list of variables that will be appended to the output.

String
distance_type
(可选)

The method of travel that will be used for the buffer calculation.

String
distance
(可选)

The distance that will be used for the buffer calculations.

Double
units
(可选)

The units that will be used for the distance parameter.

String
out_enriched_buffers
(可选)

The feature class that will contain the enriched buffers.

Feature Class
travel_direction
(可选)

Specifies the direction of travel that will be used between the center of the cell and the buffer boundary.

  • TOWARD_STORESThe direction of travel will be from location points to input features. This is the default.
  • AWAY_FROM_STORESThe direction of travel will be from input features to location points.
String
time_of_day
(可选)

The time at which the travel will begin.

Date
time_zone
(可选)

Specifies the time zone that will be used for the time_of_day parameter.

  • UTCCoordinated universal time (UTC) will be used. Choose this option if you want the best location for a specific time, such as now, but aren't certain of the time zone.
  • TIME_ZONE_AT_LOCATIONThe time zone in which the area_of_interest value is located will be used. This is the default.
String
search_tolerance
(可选)

The maximum distance that input points can be from the network. Points located beyond the search tolerance will be excluded from processing.

Linear Unit
polygon_detail
(可选)

Specifies the level of detail that will be used for the output drive time polygons.

  • STANDARDThe optimal setting that combines processing speed with overall accuracy will be used. This is the default.
  • GENERALIZEDThe fastest method will be used.
  • HIGHThe highest level of detail will be used.
String
out_centroids
(可选)

The feature class that will contain the cell centroids.

Feature Class

代码示例

GenerateGridsAndHexagons example (stand-alone script)

The following Python window script demonstrates how to use the GenerateGridsAndHexagons function.

import arcpy
arcpy.ba.GenerateGridsAndHexagons("LoudonCountyVA", "MyProject.gdb\output", "HEXAGON", "ENRICH_BUFFER", "1 SquareMiles", None, "populationtotals.totpop_cy", "Driving Time", 1, "MINUTES", None, "TOWARD_STORES", None, "TIME_ZONE_AT_LOCATION", None, "STANDARD", None)

许可信息

  • Basic: 需要 Business Analyst, ArcGIS Network Analyst 扩展
  • Standard: 需要 Business Analyst, ArcGIS Network Analyst 扩展
  • Advanced: 需要 Business Analyst, ArcGIS Network Analyst 扩展

相关主题