ArcInfo Workstation 项属性 (arcpy)

摘要

Describe 函数可返回以下 ArcInfo Workstation INFO 表项目的属性。ArcInfo Workstation 项目可通过 ArcInfo Workstation INFO 表属性itemSet 属性进行访问。

ArcInfo Workstation 项目可返回 "ArcInfoItem"dataType

属性

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

The alternate name is another name you can use to refer to the item. It sometimes contains abbreviated names for items that otherwise have long descriptive names. Long item names often help for documentation purposes. Shorter names may be convenient for ad hoc usage.

String
isIndexed
(只读)

True if the item is indexed. Indexed items speed up selection operations on large INFO files.

Boolean
isPseudo
(只读)

True if the item is a pseudo item.

Boolean
isRedefined
(只读)

True if it is a redefined item. Redefined items can be subsets of regular items or can span multiple regular items.

Boolean
itemType
(只读)

The data type of the item. One of Binary, Character, Date, Floating, Integer, Number, and OID.

String
numberDecimals
(只读)

The number of digits to the right of the decimal place. This is only for item types that hold decimal numbers.

Integer
outputWidth
(只读)

The number of spaces used to display the item's values.

Integer
startPosition
(只读)

The starting position of a redefined item.

Integer
width
(只读)

The number of spaces (or bytes) used to store the item's values.

Integer

代码实例

ArcInfo Workstation Item properties example (stand-alone script)

The following stand-alone script displays properties from all the ArcInfo Workstation Items in an ArcInfo Workstation Table.

import arcpy

# Create a list of Describe objects from the ArcInfo Table.
#
descList = arcpy.Describe("C:/data/crimefreq").itemSet

# Print properties about each item in the itemSet
#
for item in descList:
    print item.name
    print "%-22s %s" % ("  Alternate name:", item.alternateName)
    print "%-22s %s" % ("  Is indexed:", item.isIndexed)
    print "%-22s %s" % ("  Is pseudo:", item.isPseudo)
    print "%-22s %s" % ("  Is redefined:", item.isRedefined)
    print "%-22s %s" % ("  Item type:", item.itemType)
    print "%-22s %s" % ("  Number of decimals:", item.numberDecimals)
    print "%-22s %s" % ("  Output width:", item.outputWidth)
    print "%-22s %s" % ("  Start position:", item.startPosition)
    print "%-22s %s" % ("  Width:", item.width)
5/10/2014