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

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

Extract Data

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

概要

Extracts input features to a geodatabase. You can optionally filter the input features with a polygon from another layer.

使用法

  • Input Datasets can include points, polylines, polygons, and annotation features.

  • If the input features include a topology, features are extracted from all the layers that participate in the topology. This may be in addition to the layers you have specified in the Input Datasets parameter.

  • Extracted data will have the same name as Input Datasets.

  • All data in Input Datasets must originate from the same workspace.

  • If extracted data originates from a feature dataset, the tool will create a feature dataset of the same name in the target geodatabase.

  • The target geodatabase must exist before this tool can run.

  • The Re-use Schema (in_reuse_schema) parameter is enabled for file and personal geodatabases only.

  • The Filter by Geometry parameter requires one selected feature in the Filter Feature Layer. The tool will return a Filter feature layer selection count not equal to 1 error if there are zero or more than one selected features.

  • The selected feature in the Filter Feature Layer must be a polygon. If it is not, the tool will return a Filter feature layer must be polygon geometry type error.

  • Related data is extracted by default. To avoid extracting related data, you must specify each relationship class that defines the related objects you want to exclude using the Exclude Relationship Classes parameter.

  • Related data is extracted in a forward direction, from origin to destination.

構文

arcpy.production.ExtractData(in_datasets, in_target_gdb, {in_reuse_schema}, {in_usefilter}, {in_filtertype}, {in_features}, {in_exclude_rel_classes})
パラメーター説明データ タイプ
in_datasets
[Dataset,{Rows Option},...]

Value table of rows that contain a dataset to extract and a filter option for that dataset. Specifying a filter option allows you to control how rows are replicated per dataset. Filter options include the following:

  • USE_FILTERS —If Filter By Geometry is checked, this tool extracts features that either intersect or are contained by features in the Filter Feature Layer. It also honors selection sets and definition expressions.
  • SCHEMA_ONLY —Extracts the schema of the dataset to the child workspace.
  • ALL_ROWS —Extracts all rows of the dataset to the child workspace.
Value Table
in_target_gdb

The workspace into which data will be extracted.

GeoDataServer; Workspace
in_reuse_schema
(オプション)

Indicates whether to reuse a geodatabase that contains the schema of the data you want to replicate. This reduces the amount of time required to replicate the data. This option is only available for checkout replicas.

  • DO_NOT_REUSE —Do not reuse schema. This is the default.
  • REUSE —Reuse schema.
String
in_usefilter
(オプション)

The filter limits extraction to features that either intersect or are contained by features in the in_features feature layer.

  • FILTER_BY_GEOMETRY —Apply the filter set in in_filtertype.
  • NO_FILTER_BY_GEOMETRY —Do not apply the spatial filter. This is the default.
Boolean
in_filtertype
(オプション)

Specifies the spatial relationship between in_datasets and in_features.

  • INTERSECTS —Extract features from in_datasets that intersect features in the in_features parameter.
  • CONTAINS —Extract features from in_datasets that are contained by the selected feature in the in_features parameter.
String
in_features
(オプション)

Feature layer with one selected feature.

Layer
in_exclude_rel_classes
[in_exclude_rel_classes,...]
(オプション)

The list of relationship classes whose relationships you want to exclude from extraction. The relationship classes will still be included if both datasets that participate are present but the related objects are not extracted.

Relationship Class

コードのサンプル

ExtractData example (Python window)

The following Python window script demonstrates how to use the ExtractData tool.

arcpy.env.workspace="c:/data"
inDatasets="Austin.gdb/AOI SCHEMA_ONLY;Austin.gdb/Counties SCHEMA_ONLY"
targetGdb="extract.gdb"
arcpy.ExtractData_production(inDatasets,targetGdb)
ExtractData example 2 (stand–alone script)

The following stand-alone script demonstrates how to use the ExtractData tool.

# Name: ExtractData.py
# Description: Extracts data from the Production Mapping Austin.gdb sample data
# Requires: ArcGIS Production Mapping

import arcpy, sys

# check out a foundation license
arcpy.CheckOutExtension("Foundation")

# set our workspace to the folder that contains both gdbs
arcpy.env.workspace = "c:/data/"

# create a feature layer for the in_features parameter
inFeatures="Austin.gdb/AOI"
inFeaturesLyr="AOI"
arcpy.MakeFeatureLayer_management(inFeatures,inFeaturesLyr)
print arcpy.GetMessages()

# select a feature in inFeaturesLyr
selType="NEW_SELECTION"
where="Q_24K_ID='42671'"
arcpy.SelectLayerByAttribute_management(inFeaturesLyr,selType,where)
print arcpy.GetMessages()

# describe inFeaturesLyr to make sure we have 1 selected feature
desc=arcpy.Describe("AOI")
if len(desc.FIDSet) != 1:
    print str(len(desc.FIDSet))
    sys.exit("Incorrect number of features selected: Tool expects 1")

# create a value table of input datasets and filter options
inDatasets="Austin.gdb/RoadL USE_FILTERS;Austin.gdb/ContourL USE_FILTERS" 

# make a new geodatabase if needed
extractGdb="extract.gdb"
if arcpy.Exists(extractGdb) == False:
    arcpy.CreateFileGDB_management(arcpy.env.workspace,extractGdb)
    print arcpy.GetMessages()

# extract data
reuseSchema="DO_NOT_REUSE"
useFilter="FILTER_BY_GEOMETRY"
filterType="CONTAINS"
arcpy.ExtractData_production(inDatasets,extractGdb,reuseSchema,useFilter,filterType,inFeaturesLyr)
print arcpy.GetMessages()

環境

  • 現在のワークスペース

ライセンス情報

  • Basic: いいえ
  • Standard: 次のものが必要 Production Mapping
  • Advanced: 次のものが必要 Production Mapping

関連トピック

  • An overview of the Distributed Geodatabase toolset

ArcGIS Desktop

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

ArcGIS

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

Esri について

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