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

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

ドメイン → テーブル (Domain To Table)

  • 概要
  • 使用法
  • 構文
  • コードのサンプル
  • 環境
  • ライセンス情報

概要

属性ドメインからテーブルを作成します。

使用法

  • 属性ドメインからテーブルを作成すると、そのテーブルの追加の編集を行えます。たとえば、コード値ドメインからテーブルを作成して、コード値リストにコード値を追加できます。次に、[テーブル → ドメイン (Table To Domain)] ツールを使用して、元のドメインを更新できます。

  • ワークスペース ドメインは、ArcCatalog または [カタログ] ウィンドウでも管理できます。[データベース プロパティ] ダイアログ ボックスの [ドメイン] タブを使用して、ドメインを作成および変更できます。

構文

arcpy.management.DomainToTable(in_workspace, domain_name, out_table, code_field, description_field, {configuration_keyword})
パラメーター説明データ タイプ
in_workspace

テーブルに変換する属性ドメインを含むワークスペース。

Workspace
domain_name

既存の属性ドメインの名前

String
out_table

作成されるテーブル。

Table
code_field

作成されたテーブル内でコード値が格納されるフィールドの名前。

String
description_field

作成されたテーブル内でコード値の説明が格納されるフィールドの名前。

String
configuration_keyword
(オプション)

テーブルを作成するためのカスタム格納キーワード (ジオデータベース テーブルの場合)。

String

コードのサンプル

Domain to Table (ドメイン → テーブル) の例 (Python ウィンドウ)

次の Python ウィンドウ スクリプトは DomainToTable (ドメイン → テーブル) 関数を使用する方法を示しています。

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.DomainToTable_management("montgomery.gdb", "DistDiam", "diameters", "code", "descript")
Domain To Table (ドメイン → テーブル) の例 2 (スタンドアロン スクリプト)

このスタンドアロン スクリプトでは、ドメインを編集するワークフローの一部として DomainToTable (ドメイン → テーブル) 関数を使用します。

# Name: RemoveDomainsExample.py
# Purpose: Update an attribute domain to constrain valid pipe material values

# Import system modules
import arcpy
import os
 
try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    arcpy.env.workspace = "C:/data"
 
    # set local parameters
    inFeatures = "Montgomery.gdb/Water/DistribMains"
    inField = "MATERIAL"
    dWorkspace = "Montgomery.gdb"
    domName = "Material"
    codedValue =  "ACP: Asbestos concrete"
    codeField = "TYPE"
    fieldDesc= "DESRIPT"
    # Process: Remove the constraint from the material field
    arcpy.RemoveDomainFromField_management(inFeatures, inField)
 
    # Edit the domain values
    # Process: Remove a coded value from the domain
    arcpy.DeleteCodedValueFromDomain_management(dWorkspace, domName, codedValue)
 
    # Process: Create a table from the domain to edit it with ArcMap editing tools
    arcpy.DomainToTable_management(dWorkspace, domname, dWorkspace + os.sep + domname , codeField, fieldDesc)
 
    # Process: Delete the domain
    arcpy.DeleteDomain_management(dWorkspace, domName)
 
    # Edit the domain table outside of geoprocessing
    # and then bring the domain back in with the TableToDomain process
 
except Exception as err:
    print(err.args[0])

環境

  • 出力データのコンフィグレーション キーワード
  • 現在のワークスペース
  • テンポラリ ワークスペース
  • 自動コミット

ライセンス情報

  • Basic: はい
  • Standard: はい
  • Advanced: はい

関連トピック

  • ドメイン ツールセットの概要
  • サブタイプの概要
  • 属性ドメインの概要
  • ジオプロセシングでの属性ドメインの注意事項

ArcGIS Desktop

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

ArcGIS

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

Esri について

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