Dataset properties (arcpy)

サマリ

The Describe function returns the following properties for Datasets.

Dataset properties are available in many types of Describe objects.

特性

プロパティ説明データ タイプ
canVersion
(読み取り専用)

Indicates whether the dataset can be versioned.

Boolean
datasetType
(読み取り専用)

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
(読み取り専用)

The ID of the dataset.

Integer
extent
(読み取り専用)

The Extent object.

注意注意:

extent is available for spatial datasets only.

Extent
isArchived
(読み取り専用)

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

Boolean
isVersioned
(読み取り専用)

Indicates whether the dataset is versioned.

Boolean
MExtent
(読み取り専用)

A space-delimited string (MMin MMax).

注意注意:

MExtent is available for spatial datasets only.

String
spatialReference
(読み取り専用)

Returns the SpatialReference object for the dataset.

注意注意:

spatialReference is available for spatial datasets only.

SpatialReference
ZExtent
(読み取り専用)

A space-delimited string (ZMin ZMax).

注意注意:

ZExtent is available for spatial datasets only.

String

コードのサンプル

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))
4/26/2014