Disponible con licencia de Business Analyst.
Resumen
Aggregates data from one layer to another. For example, you can summarize block group demographic data for a set of trade areas.
Ilustración
![Spatial Overlay apportionment Spatial Overlay apportionment](GUID-7029C5AE-3733-4EDB-ABA4-E37765EAA621-web.bmp)
Uso
The input layer must be properly formatted using the Analysis Layer Setup tool in Business Analyst with appropriate apportionment values applied.
The input layer contains the underlying data you want to extract.
Data is added to the overlay layer. Data is extracted from the input layer and aggregated into the overlay layer.
You can aggregate from a point- or polygon-based input layer.
A file called Ratios Table.dbf will be created and added in the same directory of the output overlay layer. This ratios table contains the percentage of intersection and weights used to execute the overlay.
Don't run a spatial overlay analysis if ArcMap is still redrawing your map. This may cause a problem with ArcMap and result in ArcMap crashing.
Sintaxis
arcpy.ba.SpatialOverlay(InputFeatureLayer, OverlayLayer, SelectedSummarizations, OutputFeatureClass, {SpatialOverlayAppendData}, {UseSelectedFeatures})
Parámetro | Explicación | Tipo de datos |
InputFeatureLayer | The input feature layer that contains the data to be extracted. | Feature Layer |
OverlayLayer | The overlay layer that inherits the data. | Feature Layer |
SelectedSummarizations [SelectedSummarization,...,...] | Selects any variable from the input layer on which to run the spatial overlay. | String |
OutputFeatureClass | The feature class that will contain the overlay features. | Feature Class |
SpatialOverlayAppendData (Opcional) | The selected variables can be appended to the overlay layer.
| Boolean |
UseSelectedFeatures (Opcional) | The boundaries used to generate the spatial overlay.
| Boolean |
Muestra de código
SpatialOverlay example (stand-alone script)
# Name: SpatialOverlay.py
# Description: Appends total population and total households to a trade area.
# Author: Esri
# Import system modules
import arcview
import arcpy
arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.8\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
try:
# Acquire extension license
arcpy.CheckOutExtension("Business")
# Define input and output parameters for the Spatial Overlay tool
# Please note that your paths may be different.
InputFeatureLayer = "C:/ArcGIS/Business Analyst/US_2022/Data/Demographic Data/BlockGroups_bg.bds"
OverlayLayer = "C:/temp/TradeArea.shp"
SelectedSummarizations = "TOTPOP_CY;HHPOP_CY"
OutputFeatureClass = "C:/temp/overlayoutput.shp"
# Create Spatial Overlay output file
arcpy.SpatialOverlay_ba(InputFeatureLayer,
OverlayLayer,
SelectedSummarizations,
OutputFeatureClass)
# Release extension license
arcpy.CheckInExtension("Business")
Entornos
Esta herramienta no utiliza ningún entorno de geoprocesamiento.
Información de licenciamiento
- Basic: Requiere Business Analyst
- Standard: Requiere Business Analyst
- Advanced: Requiere Business Analyst