Extract Data (Production Mapping)

Résumé

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

Usage

Syntaxe

ExtractData_production (in_datasets, in_target_gdb, {in_reuse_schema}, {in_usefilter}, {in_filtertype}, {in_features})
ParamètreExplicationType de donnée
in_datasets
[in_datasets,...]

The input data to extract into another geodatabase.

Feature Layer
in_target_gdb

The workspace into which data will be extracted.

Workspace
in_reuse_schema
(Facultatif)

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_REUSEDo not reuse schema. This is the default.
  • REUSEReuse schema.
String
in_usefilter
(Facultatif)

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

  • TRUEApply the filter set in in_filtertype.
  • FALSEDo not apply the spatial filter.
Boolean
in_filtertype
(Facultatif)

Specifies the spatial relationship between in_datasets and in_features.

  • INTERSECTSExtract features from in_datasets that intersect features in the in_features parameter.
  • CONTAINSExtract features from in_datasets that are contained by the selected feature in the in_features parameter.
String
in_features
(Facultatif)

Feature layer with one selected feature.

Feature Layer

Exemple de code

ExtractData example 1 (Stand–alone Python script)

This stand-alone Python script extracts production mapping sample data from an ArcSDE geodatabase. The script extracts data based on a single selected feature describing an AOI.

# Name: ExtractData.py
# Description: Extracts data from the Production Mapping SoCal sample data
# Author: ESRI
# Date: March 2010

import arcpy

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

# import the production mapping toolbox - you may have to change this path
arcpy.ImportToolbox(r'C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Production Mapping Tools.tbx')

# set our workspace to an sde connection file
arcpy.env.workspace = "c:/data/SoCal.sde"

# fully qualified name to an ArcSDE feature class (dataset/feature class)
coastpath = "socal.GIS.SoCal/socal.GIS.CoastA"

# make a feature layer from islands in the CoastA feature class in the
# prod mapping sample data 
if arcpy.Exists("Coast") == False:
    arcpy.MakeFeatureLayer_management(coastpath,"Coast")

# select an island - verify that objectid 84 is an island in your data
arcpy.SelectLayerByAttribute_management("Coast","NEW_SELECTION","objectid=84")

checkoutDb = "c:/data/SoCalIslandTrees.gdb"

# make a new geodatabase
if arcpy.Exists(checkoutDb) == False:
    arcpy.CreateFileGDB_management("c:/data","SoCalIslandTrees.gdb")    

# another fully qualified ArcSDE name (dataset/feature class)
treespath="socal.GIS.SoCal/socal.GIS.TreesA"

# check out some data into the new file gdb
arcpy.ExtractData_production(treespath,checkoutDb,"TRUE","INTERSECTS","Coast")

# check the extension in
arcpy.CheckInExtension("Foundation")

ExtractData example 2 (Python window)

This sample ArcGIS Python window script uses the ExtractData tool to extract features from an Oracle geodatabase into a file geodatabase.

sourceDb=r'c:\data\Socal_sample_oracle.sde\SOCAL_DATA.SC_Index'
arcpy.ExtractData_production(sourceDb,r'c:\data\outExtents.gdb',"NO_FILTER_BY_GEOMETRY","INTERSECTS","")

Environnements

Cet outil ne fait appel à aucun environnement de traitement de données géographiques

Rubriques associées

Informations de licence

ArcView : RequiertProduction Mapping
ArcEditor : RequiertProduction Mapping
ArcInfo : RequiertProduction Mapping

9/30/2010