Get Features By Job AOI (Topographic Production)

摘要

Extracts features from a source geodatabase to a target geodatabase based on the Filter Feature Layer parameter value (or job AOI).

The Target Database parameter value can be a database that includes the input schema, or it can be an empty database in which the tool will create a schema that matches the Source Database parameter value.

警告:

This tool is designed to be run as a step in a Workflow Manager (Classic) workflow. Running this tool outside of Workflow Manager (Classic) does not honor all Workflow Manager (Classic) constraints such as job assignment, dependencies, or holds and may cause a job to enter an unusable state.

警告:

This tool is intended for use with the Topographic Mapping production workflows and will not support an improperly configured Workflow Manager (Classic) repository. Sample workflows and instructions for configuring Topographic Mapping production workflows are available as part of the product file installer.

提示:

It is recommended that current Workflow Manager (Classic) users begin new projects using the services-driven version of ArcGIS Workflow Manager for ArcGIS Pro.

使用情况

  • This tool will extract all points, polylines, polygons, and annotation features from the Source Database parameter value. If the input features include a topology, features are extracted from all the layers that participate in that topology.

  • For tables, only the schema for the table will be copied to the Target Database parameter value.

  • The Target Database parameter value must exist before this tool is run.

  • If the Target Database parameter value includes feature classes with the same name as features classes in the source, the tool will reuse the schema in the Target Database parameter value and only get features for these feature classes.

  • If no Filter Feature Layer parameter value is specified, the tool will use the job AOI as the extent for extraction.

  • If the Replicate Data option is specified for the Extract Operation parameter value, all features that intersect the Filter Feature Layer parameter value, or job AOI, will be extracted. If the Extract Data option is specified for the Extract Operation parameter value, you can choose the feature extents in the Filter Spatial Relation parameter value.

  • The Filter Feature Layer parameter value requires that a single feature is selected.

  • The selected feature in the Filter Feature Layer parameter value must be a polygon. If it is not, the tool will return an error.

  • When using the Extract Data By Feature tool or creating a checkout replica, this tool will use the following job extended property values from the TOPO_PRODUCTION_PROPERTIES table for an optional extraction or replication, respectively:

    • EXTRACT_EXPAND—Specifies whether expanded feature classes and tables such as those in networks, topologies, or relationship classes will be added
    • EXTRACT_REPLICATE_RELATED—Specifies whether rows related to existing rows in the replica will be replicated
    • EXTRACT_EXCLUDED_RELS—Specifies the relationship classes with relationships to exclude from extraction
    • EXTRACT_EXPRESSION—Specifies a SQL expression that further refines results from the AOI extraction
    • EXTRACT_EXCLUDED_FCS—Specifies the feature classes or tables to exclude from extraction or replication

参数

标注说明数据类型
Job ID

The job ID of the Workflow Manager (Classic) job that will be updated. The default area over which features will be extracted or replicated is also determined.

Long
Source Database

The path to the source database containing features to extract.

Workspace
Target Database

The database from which features will be extracted.

Workspace
Extract Operation

Specifies whether the data will be copied to the target database or replicated to the target database.

  • Extract DataA copy of the features will be extracted to the target database. This is the default.
  • Replicate DataThe features will be extracted as a replica.
String
Filter Feature Layer
(可选)

A feature layer with one selected feature that will be used to limit the extent of the data that will be extracted. If no filter feature is specified, the job AOI will be used.

Feature Layer
Filter Spatial Relation
(可选)

Specifies the spatial relationship between the Source Database and Filter Feature Layer parameter values. This parameter is only used if the Extract Operation parameter is set to Extract Data.

  • IntersectsFeatures from the Source Database parameter value that intersect features in the Filter Feature Layer parameter value will be extracted. This is the default.
  • ContainsFeatures from the Source Database parameter value that are contained in the selected feature in the Filter Feature Layer parameter value will be extracted.
  • ClipFeatures from the Source Database parameter value that intersect features in the Filter Feature Layer parameter value will be extracted. Features are then split at the AOI boundary and only those within the AOI boundary will be kept.
String
Replica Type
(可选)

Specifies the type of replica that will be created. This parameter is only used if the Extract Operation parameter is set to Replicate Data.

  • Two-way ReplicaChanges will be sent between child and parent replicas in both directions.
  • One-way ReplicaChanges will be sent from the parent replica to the child replica only.
  • Check OutData will be replicated, edited, and checked back in one time. This is the default.
  • One-way Child To Parent ReplicaChanges will be sent from the child replica to the parent replica only.
String
Input Database Path
(可选)

The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.

File

派生输出

标注说明数据类型
Updated Database

Returns the Target Database parameter value with the extracted features added to the database.

Workspace

arcpy.topographic.GetFeaturesByJobAOI(job_id, source_database, target_database, extract_operation, {filter_feature}, {filter_type}, {replica_type}, {database_path})
名称说明数据类型
job_id

The job ID of the Workflow Manager (Classic) job that will be updated. The default area over which features will be extracted or replicated is also determined.

Long
source_database

The path to the source database containing features to extract.

Workspace
target_database

The database from which features will be extracted.

Workspace
extract_operation

Specifies whether the data will be copied to the target database or replicated to the target database.

  • EXTRACT_DATAA copy of the features will be extracted to the target database. This is the default.
  • REPLICATE_DATAThe features will be extracted as a replica.
String
filter_feature
(可选)

A feature layer with one selected feature that will be used to limit the extent of the data that will be extracted. If no filter feature is specified, the job AOI will be used.

Feature Layer
filter_type
(可选)

Specifies the spatial relationship between the source_database and filter_feature parameter values. This parameter is only used if the extract_operation parameter is set to EXTRACT_DATA.

  • INTERSECTSFeatures from the source_database parameter value that intersect features in the filter_feature parameter value will be extracted. This is the default.
  • CONTAINSFeatures from the source_database parameter value that are contained in the selected feature in the filter_feature parameter value will be extracted.
  • CLIPFeatures from the source_database parameter value that intersect features in the filter_feature parameter value will be extracted. Features are then split at the AOI boundary and only those within the AOI boundary will be kept.
String
replica_type
(可选)

Specifies the type of replica that will be created. This parameter is only used if the extract_operation parameter is set to REPLICATE_DATA.

  • TWO_WAY_REPLICAChanges will be sent between child and parent replicas in both directions.
  • ONE_WAY_REPLICAChanges will be sent from the parent replica to the child replica only.
  • CHECK_OUTData will be replicated, edited, and checked back in one time. This is the default.
  • ONE_WAY_CHILD_TO_PARENT_REPLICAChanges will be sent from the child replica to the parent replica only.
String
database_path
(可选)

The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.

File

派生输出

名称说明数据类型
updated_database

Returns the target_database parameter value with the extracted features added to the database.

Workspace

代码示例

GetFeaturesByJobAOI example (stand-alone script)

The following stand-alone script demonstrates how to use the GetFeaturesByJobAOI function to extract features from a source geodatabase to a target geodatabase based on the filter_feature parameter (or job AOI).

# Name: GetFeaturesByJobAOI_sample.py
# Description: Sample script extracts features from a source geodatabase into a target
# geodatabase based on the Filter Feature Layer (or job AOI).

# Import System Modules
import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
arcpy.CheckOutExtension('JTX')

# Setting the environment
arcpy.env.overwriteOutput = True

# Setting Local Variables
job_id = 11883
source_database = r'\\server1\data\TopoMapping\TestData\ProJobArtifacts\TDS_JOB_11882'
target_database = r'C:\data\Geodatabases\TDS_JOB_11882.gdb'
extract_operation = 'REPLICATE_DATA'
filter_feature = ''
filter_type = 'CONTAINS'
replica_type = 'CHECK_OUT'
database_path = ''

# Calling the Copy Job Files tool to copy files from a shared server machine to a location on a local machine
arcpy.topographic.(job_id, source_database, target_database, extract_operation, filter_feature, filter_type, replica_type, database_path)

# Getting all messages, warnings, and errors from the tool run and printing the results back to the user
messages = arcpy.GetMessages(0)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
arcpy.AddMessage('Tool Messages: {}\nTool Warnings: {}\nTool Errors{}\n'.format(messages, warnings, errors))

# Check In Extensions
arcpy.CheckInExtension('Foundation')
arcpy.CheckOutExtension('JTX')

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 否
  • Standard: 需要 Production Mapping and Workflow Manager
  • Advanced: 需要 Production Mapping and Workflow Manager

相关主题