Skip To Content

Get Features By Job AOI (Topographic Production)

Zusammenfassung

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

The Target Database specified 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.

Vorsicht:

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

Vorsicht:

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

Verwendung

  • This tool will extract all points, polylines, polygons, and annotation features from the Source Database. 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.

  • The Target Database must exist before this tool can run.

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

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

  • If Replicate Data is chosen as the Extract Operation, all features that intersect the Filter Feature Layer, or job AOI, will be extracted. If Extract Data is chosen as the Extract Operation, you can choose the feature extents using the Filter Spatial Relation parameter.

  • The Filter Feature Layer parameter requires that only one feature is selected.

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

Syntax

GetFeaturesByJobAOI(job_id, source_database, target_database, extract_operation, {filter_feature}, {filter_type}, {replica_type}, {database_path})
ParameterErklärungDatentyp
job_id

The job ID of the Workflow Manager 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
(optional)

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

Layer
filter_type
(optional)

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

  • INTERSECTSFeatures from the Source Database parameter that intersect features in the Filter Feature Layer parameter will be extracted. This is the default.
  • CONTAINSFeatures from the Source Database parameter that are contained in the selected feature in the Filter Feature Layer parameter will be extracted.
  • CLIPFeatures from the Source Database parameter that intersect features in the Filter Feature Layer parameter will be extracted. Features are then split at the AOI boundary and only those in the AOI boundary will be kept.
String
replica_type
(optional)

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

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

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

File

Abgeleitete Ausgabe

NameErklärungDatentyp
updated_database

Returns the Target Database with the extracted features added to the databases.

Workspace

Codebeispiel

GetFeaturesByJobAOI example (stand-alone script)

The following stand-alone script demonstrates how to use the GetFeaturesByJobAOI function to extract features from a source geodatabase into a target geodatabase based on the filter_feature (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')

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Lizenzinformationen

  • Basic: Nein
  • Standard: Erfordert Production Mapping and Workflow Manager
  • Advanced: Erfordert Production Mapping and Workflow Manager

Verwandte Themen