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

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

带状地图索引要素

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

描述

该工具可根据单个线状要素或一组线状要素创建一系列矩形面或索引要素。这些索引要素可与“数据驱动页面”结合使用,以便根据线状要素定义一幅带状地图或一组地图中的页面。生成的索引要素中包含可在页面上旋转及定向地图的属性,还包含决定哪些索引要素或页面与当前页面相邻(左右侧或上下侧)的属性。

使用方法

  • 线要素不得位于几何网络中。

  • 如果使用使用页面单位和比例参数,则需要地图比例参数。如果 ArcMap 呈打开状态,则将使用活动数据框的地图比例,否则,默认值为 1。如果您在地图空间中指定索引要素的大小并且未选择使用页面单位和比例,则不需要使用地图比例。

  • 生成的索引要素通过许多属性创建而成。这些属性包括 PageNumber、GroupId、SeqId、Previous、Next、LeftPage、RightPage、TopPage、BottomPage 和 Angle。

    • Angle 是数值型值,表示将索引要素的边与布局页面的边对齐时地图(数据框)所需旋转的角度。为与制图惯例保持一致,这些角度值将计算为尽量将“北”朝向页面顶部。角度值会根据地图的默认定向进行计算,其中 0 度表示正北方向,90 度表示正东方向,180 度表示正南方向,而 -90 度表示正西方向。
    • PageNumber 是指定给各索引要素呈递增趋势的增量。
    • GroupId 是整型值,它会指定给相连线要素链或线要素组中的所有索引要素。带状地图索引要素结果中可包括多个组。通常,单个组由一组相连的多个线要素组成或由带有多个未相连部分的单条线组成。基于未相连的独立线要素创建的索引要素将分别指定给各个组。GroupId 的值唯一,根据给定链中的第一个线要素的 ObjectID 得来。
    • SeqId 是一个增量,根据各组中要素的创建顺序将其指定给各索引要素。
    • PrevPage 表示之前创建的索引要素的 PageNumber 值。该字段可用于分析索引要素的创建顺序。请不要使用该字段运行“数据驱动页面”的动态文本。要运行动态文本,可使用 LeftPage、RightPage、TopPage 和 BottomPage 字段。
    • Next 表示创建的下一个索引要素的 PageNumber 值。该字段可用于分析索引要素的创建顺序。请不要使用该字段运行“数据驱动页面”的动态文本。要运行动态文本,可使用 LeftPage、RightPage、TopPage 和 BottomPage 字段。
    • 将结果应用到“数据驱动页面”时,可使用 LeftPage、RightPage、TopPage 和 BottomPage。LeftPage 表示应用旋转后显示在当前索引要素左侧的索引要素的 PageNumber 值。RightPage 是右侧索引要素的 PageNumber 值。而 TopPage 和 BottomPage 分别表示显示在上下端的索引要素的 PageNumber 值。

  • 如果选择使用页面单位和比例,沿线长度和垂直于线的长度的单位会自动更改为活动地图文档中设置的页面单位(如果 ArcMap 已打开),而如果使用的是 ArcMap 会话以外的工具,则将更改为英寸。为求得最佳结果,这些单位应指定为页面单位,例如英寸或厘米。如果未选择使用页面单位和比例,则单位应指定为地图单位,例如米、英尺、千米、英里或十进制度。

语法

arcpy.cartography.StripMapIndexFeatures(in_features, out_feature_class, {use_page_unit}, {scale}, {length_along_line}, {length_perpendicular_to_line}, {page_orientation}, {overlap_percentage}, {starting_page_number}, {direction_type})
参数说明数据类型
in_features

定义带状地图索引要素路径的输入折线要素。

Feature Layer
out_feature_class

面索引要素的输出要素类。

Feature Class
use_page_unit
(可选)

指定索引要素的大小输入是否使用页面单位。

  • USEPAGEUNIT —索引面的高度和宽度使用页面单位来计算。
  • NO_USEPAGEUNIT —索引面的高度和宽度使用地图单位来计算。这是默认设置。
Boolean
scale
(可选)

如果要以页面单位计算索引要素的长度(沿线长度和垂直于线的长度),则必须指定地图比例。如果正在使用 ArcMap,则默认值将为活动数据框的比例;否则,默认值将为 1。

Long
length_along_line
(可选)

沿以地图单位或页面单位指定的输入线要素方向的面索引要素长度。默认值由输入的一个或多个线要素的空间参考决定。该值为 x 轴方向上输入要素类长度的 1/100。

Linear Unit
length_perpendicular_to_line
(可选)

垂直于以地图单位或页面单位指定的输入线要素的面索引要素长度。默认值由输入的一个或多个线要素的空间参考决定。该值为沿线方向要素长度的一半。

Linear Unit
page_orientation
(可选)

指定布局页面上输入线要素的方向。

  • VERTICAL —页面上带状地图系列的方向为从上至下。
  • HORIZONTAL —页面上带状地图系列的方向为从左至右。这是默认设置。
String
overlap_percentage
(可选)

系列中单个地图页面与其相邻页面之间地理叠加的近似百分比。默认值为 10。

Double
starting_page_number
(可选)

起始页的页码。各格网索引要素将分配到连续的页码,起始页码需要指定。默认值为 1。

Long
direction_type
(可选)

指定带状地图的初始方向。

  • WE_NS —如果线的方向趋势是自西向东,则起点将在线的最西端;如果线的方向趋势是自北向南,则起点将在线的最北端。这是默认设置。
  • WE_SN —如果线的方向趋势是自西向东,则起点将在线的最西端;如果线的方向趋势是自南向北,则起点将在线的最南端。
  • EW_NS —如果线的方向趋势是自东向西,则起点将在线的最东端;如果线的方向趋势是自北向南,则起点将在线的最北端。
  • EW_SN —如果线的方向趋势是自东向西,则起点将在线的最东端;如果线的方向趋势是自南向北,则起点将在线的最南端。
String

代码示例

StripMapIndexFeatures 示例 1(Python 窗口)

在如下示例中,将根据输入线要素创建带状地图索引要素,为布局页面指定索引要素尺寸。

import arcpy
arcpy.env.workspace = 'C:\data\ProjectData.gdb'
arcpy.StripMapIndexFeatures_cartography('lines', 'indexFeatures',
                                        'USEPAGEUNIT', 500000,
                                        '7 inches', '5 inches')
StripMapIndexFeatures 示例 2(独立脚本)

在如下示例中,将根据输入线要素创建带状地图索引要素,为布局页面指定索引要素尺寸。

# Description: Creates a series of strip map index features based on inputed
# line features with index feature dimensions specified for a layout page.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:\data\ProjectData.gdb"

# Set local variables
inFeatures = "line"
outFeatureClass = "indexFeatures"
usePageUnit = "USEPAGEUNIT"
scale = "500000"
lenA = "7 Inches"
lenP = "5 Inches"

# Execute StripMapIndexFeatures
arcpy.StripMapIndexFeatures_cartography(inFeatures, outFeatureClass,
                                        usePageUnit, scale, lenA, lenP)
StripMapIndexFeatures 示例 3(Python 窗口)

在如下示例中,将根据输入线要素创建带状地图索引要素,索引要素尺寸指定为使用地图单位并且叠加为 0。

import arcpy
arcpy.env.workspace = 'C:\data\ProjectData.gdb'
arcpy.StripMapIndexFeatures_cartography('lines', 'indexFeatures', '',
                                        '', '10 kilometers', '5 kilometers')
StripMapIndexFeatures 示例 4(独立脚本)

在如下示例中,将根据输入线要素创建带状地图索引要素,索引要素尺寸指定为使用地图单位并且叠加为 0。

# Description: Creates a series of strip map index features based on inputed
# line features with index feature dimensions specified in map units with an
# overlap set at 0.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:\data\ProjectData.gdb"

# Set local variables
inFeatures = "line"
outFeatureClass = "indexFeatures"
lenA = "10 Kilometers"
lenP = "5 Kilometers"

# Execute StripMapIndexFeatures
arcpy.StripMapIndexFeatures_cartography(inFeatures, outFeatureClass, "",
                                        "", lenA, lenP)
StripMapIndexFeatures 示例 5(Python 窗口)

在如下示例中,将根据输入线要素创建带状地图索引要素,为布局页面指定索引要素尺寸并且页面方向设定为垂直。

import arcpy
arcpy.env.workspace = 'C:\data\ProjectData.gdb'
arcpy.StripMapIndexFeatures_cartography('lines', 'indexFeatures',
                                        'USEPAGEUNIT', 500000, '5 inches',
                                        '7 inches', 'VERTICAL')
StripMapIndexFeatures 示例 6(独立脚本)

在如下示例中,将根据输入线要素创建带状地图索引要素,为布局页面指定索引要素尺寸并且页面方向设定为垂直。

# Description: Creates a series of strip map index features based on inputed
# line features with index feature dimensions specified for a layout and
# the page orientation set as vertical.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:\data\ProjectData.gdb"

# Set local variables
inFeatures = "line"
outFeatureClass = "indexFeatures"
usePageUnit = "USEPAGEUNIT"
scale = "500000"
lenA = "7 Inches"
lenP = "5 Inches"
pageOrientation = "VERTICAL"

# Execute StripMapIndexFeatures
arcpy.StripMapIndexFeatures_cartography(inFeatures, outFeatureClass,
                                        usePageUnit, scale, lenA, lenP,
                                        pageOrientation)
StripMapIndexFeatures 示例 7(Python 窗口)

在如下示例中,将根据输入线要素创建带状地图索引要素,要素尺寸的具体设置为使用地图单位、起始页码和带状地图方向。

import arcpy
arcpy.env.workspace = 'C:\data\ProjectData.gdb'
arcpy.StripMapIndexFeatures_cartography('lines', 'indexFeatures', '', '',
                                        '10 kilometers', '5 kilometers',
                                        '', '', 5, 'EW_SN')
StripMapIndexFeatures 示例 8(独立脚本)

在如下示例中,将根据输入线要素创建带状地图索引要素,要素尺寸的具体设置为使用地图单位、起始页码和带状地图方向。

# Description: Creates a series of strip map index features based on inputed
# line features with index feature dimensions specified in map units, the
# starting page number is 5 and the strip map direction is
# East-West/South-North.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:\data\ProjectData.gdb"

# Set local variables
inFeatures = "line"
outFeatureClass = "indexFeatures"
lenA = "10 Kilometers"
lenP = "5 Kilometers"
startingPageNum = "5"
directionType = "EW_SN"

# Execute StripMapIndexFeatures
arcpy.StripMapIndexFeatures_cartography(inFeatures, outFeatureClass, "", "",
                                        lenA, lenP, "", "", startingPageNum,
                                        directionType)

环境

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

许可信息

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

相关主题

  • 数据驱动页面工具集概述
  • 使用 ArcGIS 构建地图册
  • 什么是数据驱动页面?
  • 创建数据驱动页面

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

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