ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

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

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

帮助

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

Index

  • 摘要
  • 讨论
  • 属性
  • 代码实例

摘要

索引对象包含有关表索引的信息。存在两种索引类型:空间与属性。空间索引存在于要素类的 shape 字段中。

讨论

无法直接创建索引对象。可通过 ListIndexes 和 Describe 功能访问索引对象。

属性

属性说明数据类型
fields
(只读)

A Python List of field objects for the index.

Field
isAscending
(只读)

The isAscending state: True if the index is sorted in ascending order.

Boolean
isUnique
(只读)

The isUnique state: True if the index is unique.

Boolean
name
(只读)

The name of the index.

String

代码实例

索引示例

显示指定表的索引属性。

import arcpy

feature_class = "c:/data/well.shp"

# Create a list of indexes using the ListIndexes function
indexes = arcpy.ListIndexes(feature_class)

# Iterate through the list of indexes
for index in indexes:
    # Print index properties
    print("Name: {0}".format(index.name))
    print("\tType            : {0}".format(index.isAscending))
    print("\tScale           : {0}".format(index.isUnique))
    print("\tNumber of fields: {0}".format(len(index.fields)))

相关主题

  • 使用字段和索引
有关此主题的反馈?

ArcGIS for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

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

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明