ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

Help

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • その他...

Describe

  • サマリー
  • 説明
  • 構文
  • コードのサンプル

サマリー

The Describe function returns a Describe object, with multiple properties, such as data type, fields, indexes, and many others. Its properties are dynamic, meaning that depending on what data type is described, different describe properties will be available for use.

Describe properties are organized into a series of property groups. Any particular dataset will acquire the properties of at least one of these groups. For instance, if describing a geodatabase feature class, you could access properties from the GDB FeatureClass, FeatureClass, Table, and Dataset property groups. All data, regardless of the data type, will always acquire the generic Describe Object properties.

説明

Many data types include properties from other property groups. For instance, if describing a geodatabase feature class, you could access properties from the GDB FeatureClass, FeatureClass, Table, and Dataset property groups.

注意:

In some cases the object returned by Describe will not have all of the properties that are documented for it. For example, the describe object for a Layer in ArcMap's table of contents will not have the layer property set. That property only exists if you describe a .lyr file.

If you try to access a property that a Describe object does not have, it will either throw an error or return an empty value (None, 0 or -1, or empty string). If you are uncertain of a particular property, you can use Python's hasattr() function to check.

  • Describe Object Properties
  • ArcInfo Workstation Item Properties
  • ArcInfo Workstation Table Properties
  • CAD Drawing Dataset Properties
  • CAD FeatureClass Properties
  • Cadastral Fabric Properties
  • Coverage FeatureClass Properties
  • Coverage Properties
  • Dataset Properties
  • dBASE Table Properties
  • Editor Tracking Properties
  • FeatureClass Properties
  • File Properties
  • Folder Properties
  • GDB FeatureClass Properties
  • GDB Table Properties
  • Geometric Network Properties
  • LAS Dataset Properties
  • Layer Properties
  • Map Document Properties
  • Mosaic Dataset Properties
  • Network Analyst Layer Properties
  • Network Dataset Properties
  • Prj File Properties
  • Raster Band Properties
  • Raster Catalog Properties
  • Raster Dataset Properties
  • RecordSet and FeatureSet Properties
  • RelationshipClass Properties
  • RepresentationClass Properties
  • Schematic Dataset Properties
  • Schematic Diagram Properties
  • Schematic Folder Properties
  • SDC FeatureClass Properties
  • Shapefile FeatureClass Properties
  • Table Properties
  • TableView Properties
  • Text File Properties
  • Tin Properties
  • Tool Properties
  • Toolbox Properties
  • Topology Properties
  • VPF Coverage Properties
  • VPF FeatureClass Properties
  • VPF Table Properties
  • Workspace Properties

構文

Describe (value)
パラメーター説明データ タイプ
value

The specified data element or geoprocessing object to describe.

String

戻り値

データ タイプ説明
Describe

Returns an object with properties detailing the data element described. Some of the returned object's properties will contain literal values or objects.

コードのサンプル

Describe properties example (stand-alone script)

The following stand-alone script displays some layer and describe object properties from a layer set by a script parameter. The parameter may get set to either a .lyr file or to a layer in ArcMap.

import arcpy

# Get the layer as a parameter and describe it.
#
# The layer could be a layer in ArcMap (like "some_layer")
# Or, it could be a .lyr file (like "C:/data/some.lyr")
#
layerString = arcpy.GetParameterAsText(0)
desc = arcpy.Describe(layerString)

# Print selected layer and describe object properties
# 
print("Name: {}".format(desc.name))
if hasattr(desc, "layer"):
    print("Layer name: {}".format(desc.layer.name))
    print("Layer data source: {}".format(desc.layer.catalogPath))
    print(".lyr file: {}".format(desc.catalogPath))
else:
    print("Layer name: {}".format(desc.name))
    print("Layer data source: {}".format(desc.catalogPath))

if desc.FIDSet != '':
    print("Number of selected features: {}".format(len(desc.FIDSet.split(";"))))

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS プラットフォーム

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

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2019 Esri. | プライバシー | リーガル