ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Grids

获得 Business Analyst 许可后可用。

  • 描述
  • 插图
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

Generates an equidistant vector based grid network for a specified area.

Learn more about how Grids works

插图

Grids example

使用方法

  • This tool creates vector based grid cells for a specified size and extent.

  • Valid numeric distances must be used when defining grid cell size values. Negative distances cannot be used.

  • The output grid will be created at the cell size specified by the grid cell size.

  • It is recommended that you limit your grid size to 0.5 miles or larger to reflect data accuracy and appropriate retrieval of demographic data that is apportioned to the grids.

  • Creating very small grid cells for a large extent will take a long to time to process when aggregating data from another layer. Each grid cell is the equivalent of a trade area.

语法

arcpy.ba.Grids(ExtentWay, GridSize, {MeasureUnits}, OutputFeatureClass, {ExtentSourceLayer}, {Extent}, {BDSFeatureClass}, {GridSymbolizationField}, {SelectedSummarizations}, {UseOnlineData})
参数说明数据类型
ExtentWay

How the extent for which the grids will be defined.

  • Enter extent coordinates manually —Defines the bounding envelope coordinates manually.
  • Get extent from the layer —Defines the bounding coordinates based on a selected layer.
String
GridSize

The unit used to determine the size of each grid.

Double
MeasureUnits
(可选)

The units used with the distance values. By default, the units defined in the Business Analyst preferences will be selected.

  • Decimal Degrees —Decimal degrees
  • Feet —Feet
  • Kilometers —Kilometers
  • Meters —Meters
  • Miles —Miles
  • Nautical Miles —Nautical miles
  • Yards —Yards
String
OutputFeatureClass

The feature class that will contain the grid features.

Feature Class
ExtentSourceLayer
(可选)

The input feature class used to define the extent of the grid network. This parameter is required if ExtentWay is set to "Get extent from the layer"

Feature Layer
Extent
(可选)

Custom bounding units for the grid extent. Enter the Y minimum and maximum and the X minimum and maximum. This parameter is required if ExtentWay is set to "Enter extent coordinates manually"

If using the Python call, enter the values as a String in the following format: "[X-min] [Y-min] [X-max] [Y-max]". For example, "0 0 100 100" (Single-space delimited, no commas).

Envelope
BDSFeatureClass
(可选)

Input feature class that will contain the available layers that can be appended to the output feature class (grid).

Feature Layer
GridSymbolizationField
(可选)

Defines the variable that will be thematically mapped in the output feature class.

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

Allows you to select from an available list of variables in the Layer to Aggregate input feature class to append to the output feature class.

String
UseOnlineData
(可选)

Selects how the Business Analyst data used in the analysis will be accessed.

  • TRUE —Allows a user to access online Business Analyst data.
  • FALSE —A user will only have access to locally loaded Business Analyst data. This is the default.
Boolean

代码示例

Grids example (stand-alone script)

# Name: Grids.py
# Description: Generates a 1-mile grid output layer based on current map extent.
# Author: Esri

# Import system modules
import arcview
import arcpy

arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.8\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
# Acquire extension license 
arcpy.CheckOutExtension("Business") 
 
# Define input and output parameters for the Grids tool
# Please note that your paths may be different.
ExtentWay1 = "Enter extent coordinates manually" 
ExtentWay2 = "Get extent from the layer"
GridSize = "1"
MeasureUnits = "Miles"
OutputFeatureClass = "C:/temp/grids.shp"
ExtentSourceLayer = "C:/temp/Boundary.shp"
Extent = "0 0 100 100", #X-min Y-min X-max Y-max
BDSFeatureClass = ""
GridSymbolizationField = ""
SelectedSummarizations = ""
UseOnlineData = "false"
 
# Create grid based trade areas

#Method 1
arcpy.Grids_ba(ExtentWay1, 
						GridSize, 
						MeasureUnits, 
						OutputFeatureClass, 
						"", 
						Extent, 
						BDSFeatureClass, 
						GridSymbolizationField, 
						SelectedSummarizations, 
						UseOnlineData)
		 
#Method 2
arcpy.Grids_ba(ExtentWay2, 
						GridSize, 
						MeasureUnits, 
						OutputFeatureClass, 
						ExtentSourceLayer, 
						"", 
						BDSFeatureClass, 
						GridSymbolizationField, 
						SelectedSummarizations, 
						UseOnlineData)
				
# Release extension license 
arcpy.CheckInExtension("Business")

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 需要 Business Analyst
  • Standard: 需要 Business Analyst
  • Advanced: 需要 Business Analyst

相关主题

  • An overview of the Trade Areas toolset

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2022 Esri. | 隐私政策 | 法律声明