Summary
Extracts data from an input database using selected areas of interest (AOI) and creates new databases for every AOI.
Usage
At least one AOI feature must be selected.
If multiple AOI features are selected, the tool will create a separate database for each selected AOI. The resulting database only contains data that is contained in the selected AOI.
The resulting databases are named based on the NRN field of the AOI. For example, if you select the AOI feature with an NRN value of V795X16573, the output database will be named V795X16573.gdb.
The NRN field must be populated.
This tool is intended for clipping out a single AOI of data from the Input Datasets, making the data more manageable and portable.
Syntax
ExtractAOI(Area_of_Interest, Input_Datasets, Output_Directory)
Parameter | Explanation | Data Type |
Area_of_Interest | The polygons used to define each database's clipped extent. | Feature Layer |
Input_Datasets | Datasets from which the data will be extracted. | Value Table |
Output_Directory | Location where the new databases will be created. | Folder |
Code sample
ExtractAOI example (Python window)
This script demonstrates how to use the ExtractAOI tool.
# Name: ExtractAOI_sample.py
# Description: Extracts data from one database using selected areas of interest (AOIs), and creates new databases for each AOI
# Requirements: Esri Defense Mapping solution
# Import arcpy module
import arcpy
# Check out the extension
arcpy.CheckOutExtension('defense')
# Declare path to AOI features
AOIFeatures = r"C:\Program Files (x86)\ArcGIS\EsriDefenseMapping\Desktop10.3\ReferenceData\MapIndex.gdb\MapIndex\TLM50_Index"
# Create feature layers of the AOI
arcpy.management.MakeFeatureLayer(AOIFeatures, "AOIFeatures")
# Select specific AOIs
selection = "NRN = 'E732X57714'"
arcpy.management.SelectLayerByAttribute("AOIFeatures", "NEW_SELECTION", selection)
# Set parameters
Input_Datesets = r'C:\Data\MGCP_TRD_4_2.GDB\MGCP'
Output_Directory = r'C:\Data\Output'
# Execute the tool
arcpy.ExtractAOI_defense(Input_Datasets, AOIFeatures, Output_Directory)
# Check in the extension
arcpy.CheckInExtension('defense')
Environments
Licensing information
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Requires Defense Mapping
- ArcGIS Desktop Advanced: Requires Defense Mapping