ArcGIS Desktop

  • 文档
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

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

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

Help

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

Make Defense Grids and Graticules

  • 摘要
  • 用法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

摘要

Generates a grids and graticules layer for Esri Defense Mapping products. This tool supports the creation of single, dual, and zipper zone grids. It simplifies grid creation by automatically populating several parameters based on a selected feature and an input grid type. It determines zone type and the correct grid .xml template used to generate the grids and graticules layer. It also determines a grid's primary and ancillary coordinate system and estimates reference scale and annotation mask margin.

用法

  • Grid templates can be found in the <installation directory>\GridTemplates\DefenseMapping directory.

  • Input Area of Interest can only be a single polygon feature from a single feature layer. With a stand-alone script, you must use the Select Layer By Attribute tool.

  • 指定一个输出位置中已存在的栅格名称时,该栅格数据将被覆盖。

  • The Primary Coordinate System is predefined in all Defense Mapping grid templates.

  • The Ancillary Coordinate System is often predefined in Defense Mapping grid templates. Dual grid templates require you to manually select the appropriate projected coordinate system.

  • During execution, this tool calls another geoprocessing tool, Feature Outline Masks. This creates a mask used to hide features along the edge of the grid. The mask improves cartographic display of annotation along the grid's edge. The output of Feature Outline Masks is added to the grid Feature Dataset.

语法

DefenseGrids_defense (in_aoi_features, grid_type, template, in_workspace, in_dataset, use_field, grid_field, grid_string, primary_coord, ancillary_coord, reference_scale, mask_margin, anno_feature_class, {update_data_frame})
参数说明数据类型
in_aoi_features

The feature layer that contains the selected feature used to determine the extent of the grid layer. The grid is created within this extent.

Layer
grid_type

Indicates the type of Defense Mapping cartographic product that will include the grid.

  • NONE —Custom grid type. Choose this option for a custom Grid Template .xml file.
  • ICM_3K —Grids for 3K ICMs
  • ICM_5K+ —Grids for 5K–7.5K ICMs
  • ICM_10K+ —Grids for 10K–15K ICMs
  • LPC50 —Grids for 50K LPCs
  • JOGA —Grids for JOG-A
  • TLM50 —Grids for 50K TLMs
  • TLM100 —Grids for 100K TLMs
  • TLM50_ELEVATION GUIDE —Grids for the TLM50 Elevation Guide
  • TLM100_ELEVATION GUIDE —Grids for the TLM100 Elevation Guide
String
template

Path to a grid .xml definition template. These templates store graphic properties for each grid layer. You can create new templates using the Production Mapping Grids and Graticules Designer or use existing templates located in the ArcGIS installation directory.

File
in_workspace

Workspace used in conjunction with the input Feature Dataset.

Workspace
in_dataset

The feature dataset that will store the features. This tool will create the feature dataset if it does not exist. Grid-specific feature classes will also be created if they do not already exist. If they already exist, and a grid with the same name and type as the one being created also exists, it will be overwritten.

String
use_field

Indicates whether a field name or string is appended to the end of the name of each feature class in the feature dataset. This allows you to store multiple grids in the same feature dataset.

  • FIELD —A field name from in_aoi_layer can be used as the grid name.
  • STRING —A custom string can be defined for the grid name.
Boolean
grid_field

The name of the field from in_aoi_features whose value is used as the grid name. This value is appended to the name of each feature class in the grid dataset. It is recommended that the NRN field be used.

Field
grid_string

The name for the cartographic grid created that allows for distinction between grids stored in the same feature dataset and set of feature classes.

String
primary_coord

Coordinate system for the grid layer being created. Typically, it will be the coordinate system of the final product or data frame. This coordinate system must be a projected coordinate system.

Spatial Reference
ancillary_coord

A secondary coordinate system in which grid components can be created.

Spatial Reference
reference_scale

The scale at which the grid is created and should be viewed. When the reference scale from the XML grid definition file is defined as Use Environment, the reference scale is derived in the following order:

  • The geoprocessing Reference Scale environment setting
  • The active data frame's reference scale
  • The active data frame's scale
  • The value from the XML grid definition file

Double
mask_margin

The amount of space that exists between the side of the annotation and the edge of the mask polygon feature. The units can be defined in page or map units. The default value is 0.2 millimeters. This creates a mask that is 0.2 millimeters, in page units, from the edge of any part of the grid annotation.

Linear unit
anno_feature_class

Name for the annotation mask feature class. The default annotation mask name uses the following naming convention: ANO_Masks_<feature dataset>_<grid name>. If the annotation mask name does not display a default name, it is likely that the Grid Name Field is blank or null.

String
update_data_frame
(可选)

Indicates if the tool will update the data frame and layout using the grid settings.

  • NO_CONFIGURELAYOUT —Do not configure the data frame and layout. This is the default.
  • CONFIGURELAYOUT —Configure the data frame and layout.
Boolean

代码示例

DefenseGrids example (Python window)

This following Python window script demonstrates how to use the DefenseGrids tool.

# Set gp environment
gridsWorkspace="c:/data/grids.gdb"
arcpy.env.workspace=gridsWorkspace
arcpy.env.addOutputsToMap=True

# variables for tools
idx="C:/Program Files (x86)/ArcGIS/EsriDefenseMapping/Desktop10.2/ReferenceData/MapIndex.mdb/MapIndex/TLM50_Index"
idxLayer = "TLM50_Index"
product="TLM50"
inTemplate="C:/Program Files (x86)/ArcGIS/Desktop10.2/GridTemplates/DefenseMapping/TLM50_Single.xml"
inDataset = "TLM50D"
outFeatures = "ANO_TLM50D_Masks_V795X22561"
useField="FIELD"
gridField="NRN"
coordsys="PROJCS['GCS WGS 1984 UTM Zone 11N (Calculated)',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];IsHighPrecision"
ancillaryCoord="GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision"
refScale=50000
maskMargin="50 Meters"
where="[NRN] = 'V795X22561'"

# Make a feature layer from the TLM50_Index feature class
arcpy.MakeFeatureLayer_management(idx,idxLayer)

# Select a feature in which to create the grid
arcpy.SelectLayerByAttribute_management(idxLayer,"NEW_SELECTION", where)

# Generate grid
arcpy.DefenseGrids_defense(idxLayer, product, inTemplate, gridsWorkspace, inDataset, useField, gridField, "", coordsys, ancillaryCoord, refScale, maskMargin, outFeatures)

环境

  • 当前工作空间

许可信息

  • ArcGIS Desktop Basic: 否
  • ArcGIS Desktop Standard: 否
  • ArcGIS Desktop Advanced: 需要 Defense Mapping

相关主题

  • An overview of the Grids and Graticules toolset

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

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

关于 Esri

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