Dataset properties

Summary

The Describe function returns the following properties for Datasets.

Dataset properties are available in many types of Describe objects.

Properties

PropertyExplanationData Type
canVersion
(Read Only)

Indicates whether the dataset can be versioned

Boolean
datasetType
(Read Only)

Returns the type of dataset being described

  • Any
  • Container
  • Geo
  • FeatureDataset
  • FeatureClass
  • PlanarGraph
  • GeometricNetwork
  • Topology
  • Text
  • Table
  • RelationshipClass
  • RasterDataset
  • RasterBand
  • TIN
  • CadDrawing
  • RasterCatalog
  • Toolbox
  • Tool
  • NetworkDataset
  • Terrain
  • RepresentationClass
  • CadastralFabric
  • SchematicDataset
  • Locator
String
DSID
(Read Only)

The ID of the dataset

Integer
extent
(Read Only)

The Extent object

Extent
isVersioned
(Read Only)

Indicates whether the dataset is versioned

Boolean
MExtent
(Read Only)

A space-delimited string (MMin MMax)

String
spatialReference
(Read Only)

Returns the SpatialReference object for the dataset

Object
ZExtent
(Read Only)

A space-delimited string (ZMin ZMax)

String

Code Sample

Dataset properties example (stand-alone script)

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

import arcpy

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

# Print dataset properties
#
print "Dataset Type: " + desc.datasetType

extent = desc.Extent
print "Extent:"
print "  %s: %f, %s: %f, %s: %f, %s: %f" % ("XMin", extent.XMax, "XMax", extent.XMax, 
                                            "YMin", extent.YMin, "YMax", extent.YMax)
print "MExtent: " + desc.MExtent
print "ZExtent: " + desc.ZExtent

SR = desc.spatialReference
print SR.name


10/28/2011