ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS for Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

Describe

  • Zusammenfassung
  • Auswertung
  • Syntax
  • Codebeispiel

Zusammenfassung

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.

Auswertung

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.

Hinweis:

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 a map 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 the Python hasattr() function to check.

  • Describe Object properties
  • ArcInfo Workstation Item properties
  • ArcInfo Workstation Table properties
  • CAD Drawing Dataset properties
  • CAD FeatureClass 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
  • Geostatistical Layer properties
  • LAS Dataset properties
  • Layer properties
  • Map Document properties
  • Mosaic Dataset properties
  • Network Analyst Layer properties
  • Network Dataset properties
  • Parcel Fabric 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

Syntax

Describe (value, {datatype})
ParameterErklärungDatentyp
value

The specified data element or geoprocessing object to describe.

String
datatype

The type of data. This is only necessary when naming conflicts exists, for example, if a geodatabase contains a feature dataset (FeatureDataset) and a feature class (FeatureClass) with the same name. In this case, the data type is used to clarify which dataset you want to describe.

(Der Standardwert ist None)

String

Rückgabewert

DatentypErklärung
Describe

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

Codebeispiel

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 can be set to either a layer file or a layer in a map.

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

  • Startseite
  • Dokumentation
  • Support

ArcGIS Plattform

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

Über Esri

  • Über uns
  • Karriere
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
Copyright © 2019 Esri. | Datenschutz | Rechtliches