Dataset properties

Zusammenfassung

The Describe function returns the following properties for Datasets.

Dataset properties are available in many types of Describe objects.

Eigenschaften

EigenschaftErklärungDatentyp
canVersion
(Nur lesen)

Indicates whether the dataset can be versioned.

Boolean
changeTracked
(Nur lesen)

Indicates if this dataset is change tracked.

Boolean
datasetType
(Nur lesen)

Returns the type of dataset being described

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

The ID of the dataset.

Integer
extent
(Nur lesen)

The Extent object.

Hinweis:

extent is available for spatial datasets only.

Extent
isArchived
(Nur lesen)

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

Boolean
isVersioned
(Nur lesen)

Indicates whether the dataset is versioned.

Boolean
MExtent
(Nur lesen)

A space-delimited string (MMin, MMax).

Hinweis:

MExtent is available for spatial datasets only.

String
spatialReference
(Nur lesen)

Returns the SpatialReference object for the dataset.

Hinweis:

spatialReference is available for spatial datasets only.

SpatialReference
ZExtent
(Nur lesen)

A space-delimited string (ZMin, ZMax).

Hinweis:

ZExtent is available for spatial datasets only.

String

Codebeispiel

Dataset properties example (stand-alone script)

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)))