ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Extract AOI

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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

arcpy.defense.ExtractAOI(Area_of_Interest, Input_Datasets, Output_Directory)
ParameterExplanationData 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: ArcGIS 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

  • Current Workspace

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping
  • Advanced: Requires Defense Mapping

Related topics

  • An overview of the Geodatabase toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

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

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal