ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

Workspace properties

  • 概要
  • プロパティ
  • コードのサンプル

概要

The Describe function returns the following properties for Workspace.

A workspace returns a dataType of "Workspace".

プロパティ

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

connectionProperties is a property set. The connection properties for an enterprise geodatabase workspace will vary depending on the type of enterprise database being used. Possible properties include the following:

  • authentication_mode—Credential authentication mode of the connection, either OSA or DBMS.
  • database—Database connected to.
  • historical_name—The historical marker name of the historical version connected to.
  • historical_timestamp—A date time that represents a moment timestamp in the historical version connected to.
  • is_geodatabase—String. Returns true if the database has been enabled to support a geodatabase; otherwise, it's false.
  • instance—Instance connected to.
  • server—Enterprise server name connected to.
  • user—Connected user.
  • version—The transaction version name of the transactional version connected to.
  • branch—The branch version name of the branch version connected to.

Only one of historical_name, historical_timestamp, version, or branch exists for any given workspace.

Object
connectionString
(読み取り専用)

The connection string being used in conjunction with the enterprise database type. For any other workspace type, returns an empty string.

String
currentRelease
(読み取り専用)

For a geodatabase workspace, returns True if the geodatabase's version is current. currentRelease can be used to assess if the geodatabase can be upgraded.

Boolean
domains
(読み取り専用)

A list containing the geodatabase domain names. To work with these domain names, you can use tools from the Domains toolset.

String
release
(読み取り専用)

For a geodatabase workspace, returns the geodatabase release value. Below is the mapping of geodatabase release values to ArcGIS version numbers.

Geodatabase release valueArcGIS version

2,2,0

9.2

2,3,0

9.3, 9.3.1

3,0,0

10.0 - 10.8.1

ArcGIS Pro 1.0 - ArcGIS Pro 2.9

String
workspaceFactoryProgID
(読み取り専用)

The ID is a string. You can use this to distinguish between specific workspace types with a finer granularity than you can with workspaceType. For example, workspaceFactoryProgID can distinguish between a file geodatabase and a personal geodatabase. Using workspaceType, you cannot make that distinction.

Following are workspaceFactoryProgID strings returned for the common workspace types:

  • esriDataSourcesGDB.AccessWorkspaceFactory.1 —Personal geodatabase
  • esriDataSourcesGDB.FileGDBWorkspaceFactory.1 —File geodatabase
  • esriDataSourcesGDB.InMemoryWorkspaceFactory.1 —In-memory workspace
  • esriDataSourcesGDB.SdeWorkspaceFactory.1 —Enterprise geodatabase
  • (empty string) —Other (shapefile, coverage, CAD, VPF, and so on)
ヒント:

The .1 following the string returned by workspaceFactoryProgID is only present in 64-bit products. If writing code that will be used against 32-bit and 64-bit products, use the string method startswith.

describe = arcpy.Describe(data)
# not - if describe.workspaceFactoryProgID == 'esriDataSourcesGDB.FileGDBWorkspaceFactory.1'
if describe.workspaceFactoryProgID.startswith('esriDataSourcesGDB.FileGDBWorkspaceFactory'):
    continue  #
String
workspaceType
(読み取り専用)

The workspace type.

  • FileSystem —File-based (coverage, shapefile, and so forth) workspaces and in-memory workspaces
  • LocalDatabase —Geodatabases that are local (a file or personal geodatabase)
  • RemoteDatabase —Geodatabases that require a remote connection (enterprise, OLE DB, and so forth)
String

コードのサンプル

Workspace properties example (stand-alone script)

The following stand-alone script displays some workspace properties for an enterprise database.

import arcpy

# Create a Describe object for an SDE database
#
desc = arcpy.Describe(r"C:data\Connection to state.sde")

# Print workspace properties
#
print "%-24s %s" % ("Connection String:", desc.connectionString)
print "%-24s %s" % ("WorkspaceFactoryProgID:", desc.workspaceFactoryProgID)
print "%-24s %s" % ("Workspace Type:", desc.workspaceType)

# Print Connection properties
#
cp = desc.connectionProperties
print "\nDatabase Connection Properties:"
print "%-12s %s" % ("  Server:", cp.server)
print "%-12s %s" % ("  Instance:", cp.instance)
print "%-12s %s" % ("  Database:", cp.database)
print "%-12s %s" % ("  User:", cp.user)
print "%-12s %s" % ("  Version:", cp.version)

# Print workspace domain names"
#
domains = desc.domains
print "\nDomains:"
for domain in domains:
    print "\t" + domain

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2021 Esri. | プライバシー | リーガル