Skip To Content

Overlay Layers

Summary

Overlays the geometries from multiple layers into one single layer. Overlay can be used to combine, erase, modify, or update spatial features.

Overlay is used to answer one of the most basic questions of geography, What is on top of what? The following are examples:

  • What parcels are within the 100-year floodplain? (Within is another way of saying on top of.)
  • What roads are within what countries?
  • What land use is on top of what soil type?
  • What wells are within abandoned military bases?

Illustration

Overlay Layers

Usage

  • Examples include the following:

    • The department of environmental quality wants to monitor the impact of grazing livestock on the state's water quality. Biologists with the department need to determine where the land deemed to be grazing allotments intersects with certain watersheds. Overlay Layers can be used to find intersecting areas.
    • A development company wants to build a golf resort in one of three centrally located counties in their state. Before they can begin planning, they need to determine whether there is enough privately owned land within those counties that they may be able to purchase for the resort. Overlay Layers can be used to remove the publically owned lands from the selected counties.

  • The input layer and overlay layer must have matching geometry types.

  • The following table outlines the overlay operations, Intersect and Erase, with different geometry types:

    Input layer (green) and overlay layer (yellow)Intersect resultsErase results
    Input and overlay polygons

    Polygon input layer (green) and overlay layer (yellow).

    Polygon feature results using Intersect

    Intersecting polygons of the input and overlay layers. B is the intersection of B and 2. D is the intersection of D and 4. E is the intersection of E and 5.

    Polygon feature results using Erase

    Polygons that are the result of the Erase operation. E has been completely erased, and a portion of B and D have been erased. A and C have not been erased.

    Input and overlay lines

    Line input layer (green) and overlay layer (yellow).

    Line feature results using Intersect

    Lines that are the result of the Intersect operation. B is the intersection of B and 2. D is the intersection of D and 4.

    Line feature results using Erase

    Lines that are the result of the Erase operation. The feature B has been completely erased and a segment of D has been erased. A and C have not been erased.

    Input and overlay points

    Point input layer (green) and overlay layer (yellow).

    Point feature results using Intersect

    Point that is the result of the Intersect operation. C is the intersection of C and 3.

    Point feature results using Erase

    Points that are the result of the Erase operation. The feature C has been erased. A and B are the result of the operation.

  • If both layers are polygons, analysis can be accelerated by setting the Self Intersecting Inputs parameter to false. You should only change this input to false if both of the following conditions are true:

    • The input layer features do not overlap other input layer features.
    • The overlay layer features do not overlap other overlay layer features.

    You can also set this parameter to false if you are not interested in returning a unique result for each self intersecting overlap. For example, census boundaries would not have any self-overlapping features, and if they were being overlaid to another disjoint polygon layer, you could set this parameter to false.

Syntax

OverlayLayers_geoanalytics (input_layer, overlay_layer, output_name, overlay_type, {include_overlaps}, {data_store})
ParameterExplanationData Type
input_layer

The point, line, or polygon features that will be overlaid with the overlay layer.

Feature Set
overlay_layer

The features that will be overlaid with the input layer features.

Feature Set
output_name

The name of the output feature service.

String
overlay_type

The type of overlay to be performed.

  • INTERSECTComputes a geometric intersection of the input layers. Features or portions of features that overlap in both the input layer and overlay layer will be written to the output layer. This is the default.
  • ERASEOnly those features or portions of features in the overlay layer that are not within the features in the input layer are written to the output.
String
include_overlaps
(Optional)

Specifies if the one or both of the input layers has overlapping features.

  • OVERLAPPINGOne or more of the layers has overlapping features. This is the default.
  • NOT_OVERLAPPINGBoth layers do not have overlapping features.
Boolean
data_store
(Optional)

Specifies the ArcGIS Data Store where the output will be saved. The default is SPATIOTEMPORAL_DATA_STORE. All results stored to the SPATIOTEMPORAL_DATA_STORE will be stored in WGS84. Results stored in a RELATIONAL_DATA_STORE will maintain their coordinate system.

  • SPATIOTEMPORAL_DATA_STOREOutput will be stored in a spatiotemporal big data store. This is the default.
  • RELATIONAL_DATA_STOREOutput will be stored in a relational data store.
String

Code sample

OverlayLayers example (stand-alone script)

The following Python window script demonstrates how to use the OverlayLayers tool.

#-------------------------------------------------------------------------------
# Name: OverlayLayers.py
# Description: Remove areas that are already developed from proposed development sites
#
# Requirements: ArcGIS GeoAnalytics Server

# Import system modules
import arcpy

# Set local variables
inFeatures = "https://myGeoAnalyticsMachine.domain.com/geoanalytics/rest/services/DataStoreCatalogs/bigDataFileShares_cityData/BigDataCatalogServer/areasOfInterest"
overlayFeatures = "https://myGeoAnalyticsMachine.domain.com/geoanalytics/rest/services/DataStoreCatalogs/bigDataFileShares_cityData/BigDataCatalogServer/commercial"
outFS = "DevelopmentSites"
overlayType = "ERASE"
dataStore = "SPATIOTEMPORAL_DATA_STORE"

# Execute Overlay Layers
arcpy.geoanalytics.OverlayLayers(inFeatures, overlayFeatures, outFS, 
                                 overlayType, dataStore)

Environments

Output Coordinate System

The coordinate system that will be used for analysis. Analysis will be completed on the input coordinate system unless specified by this parameter. For GeoAnalytics Tools, final results will be stored in the spatiotemporal data store in WGS84.

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS GeoAnalytics Server
  • ArcGIS Desktop Standard: Requires ArcGIS GeoAnalytics Server
  • ArcGIS Desktop Advanced: Requires ArcGIS GeoAnalytics Server

Related topics