Dataset properties

Synthèse

The Describe function returns the following properties for datasets.

Dataset properties are available in many types of Describe objects.

Propriétés

PropriétéExplicationType de données
canVersion
(Lecture seule)

Indicates whether the dataset can be versioned.

Boolean
changeTracked
(Lecture seule)

Indicates whether the dataset is change tracked.

Boolean
datasetType
(Lecture seule)

Returns the type of dataset being described.

  • Any
  • CadastralFabric
  • CadDrawing
  • Container
  • DiagramDataset
  • FeatureClass
  • FeatureDataset
  • Geo
  • LasDataset
  • Locator
  • MosaicDataset
  • NetworkDataset
  • ParcelDataset
  • PlanarGraph
  • RasterBand
  • RasterDataset
  • RelationshipClass
  • SchematicDataset
  • Table
  • Text
  • TIN
  • Tool
  • Toolbox
  • Topology
  • Terrain
  • UtilityNetwork
String
DSID
(Lecture seule)

The ID of the dataset.

Integer
extent
(Lecture seule)

The Extent object.

Remarque :

extent is available for spatial datasets only.

Extent
isArchived
(Lecture seule)

Indicates whether the dataset has been archived. isArchived is only supported for an enterprise geodatabase.

Boolean
isVersioned
(Lecture seule)

Indicates whether the dataset is versioned.

Boolean
MExtent
(Lecture seule)

A space-delimited string (MMin, MMax).

Remarque :

MExtent is available for spatial datasets only.

String
spatialReference
(Lecture seule)

Returns the SpatialReference object for the dataset.

Remarque :

spatialReference is available for spatial datasets only.

SpatialReference
workspace
(Lecture seule)

Returns a Describe object with the properties of the input dataset's workspace.

See Workspace properties for specific workspace-related Describe details.

Remarque :

Use this property to determine workspace properties for many data types including: layers, and feature classes in a geodatabase that may or may not be in a feature dataset.

Describe
ZExtent
(Lecture seule)

A space-delimited string (ZMin, ZMax).

Remarque :

ZExtent is available for spatial datasets only.

String

Exemple de code

Dataset properties example

The following stand-alone script displays dataset properties for a shapefile.

import arcpy

# Create a Describe object from the shapefile
#
desc = arcpy.Describe("C:/temp/xy.shp")

# Print dataset properties
#
print(("Dataset Type: {0}".format(desc.datasetType)))
print(("Extent:\n  XMin: {0}, XMax: {1}, YMin: {2}, YMax: {3}".format(
    desc.extent.XMin, desc.extent.XMax, desc.extent.YMin, desc.extent.YMax)))
print(("MExtent: {0}".format(desc.MExtent)))
print(("ZExtent: {0}".format(desc.ZExtent)))

print(("Spatial reference name: {0}:".format(desc.spatialReference.name)))