Land cover post-processing suite for semantic segmentation outputs in ArcGIS Pro
A modular Python Toolbox (.pyt) for ArcGIS Pro that converts raw pixel-level classification rasters into clean, attributed vector features. Designed for drone imagery captured with the MicaSense Altum-PT multispectral sensor and classified using DeepLabV3 + PointRend (ResNet-101 backbone).
Four specialized tools share a common raster-to-vector pipeline and add domain-specific refinement for each land cover class:
| Tool | Phase 4 (Shape) | Phase 7 (Classification) | Extras |
|---|---|---|---|
| Vehicle | SimplifyPolygon | Area + L/W ratio | — |
| Building | RegularizeBuildingFootprint | Area + nDSM min height | Right angles enforcement |
| Tree | SmoothPolygon (PAEK) | Area + nDSM min height | Watershed / Grid crown separation |
| Road | Simplify + Dissolve | nDSM ceiling + MBR dims | Voronoi medial axis centerlines |
PostProcessing.pyt ← UI + parameter logic (all 4 tools)
_postproc_common.py ← shared pipeline phases (0-3, 5-6, 8)
_vehicle_core.py ← vehicle-specific phases (4, 7)
_building_core.py ← building-specific phases (4, 7)
_tree_core.py ← tree-specific phases (4, 4.5, 7)
_road_core.py ← road-specific phases (4a, 7, 7.5)
Shared pipeline (every tool runs these):
| Phase | Function | Description |
|---|---|---|
| 0 | validate_inputs |
CRS check, cell size resolution, AOI extent, spatial overlap |
| 1 | extract_class_pixels |
Con(VALUE = target, 1, 0) binary raster |
| 2 | run_majority_filter |
Salt-and-pepper noise removal (FOUR/EIGHT/Skip) |
| 3 | vectorize_binary |
RasterToPolygon, NO_SIMPLIFY, SINGLE_OUTER_PART |
| 5 | compute_geometry_mbr |
Area, Perimeter, MBR Length/Width/Azimuth, L/W ratio |
| 6 | enrich_attributes |
Sequential ID, Compactness, ZonalStats (nDSM + thermal) |
| 8 | export_results |
CopyFeatures, centroids, JSON log, summary statistics |
Explore the pipeline visually with interactive HTML guides:
- Toolbox Overview Guide — All 4 tools, shared pipeline, deep-dives into Watershed, Grid, and Voronoi
- Vehicle Pipeline Animation — Step-by-step vehicle detection
- Building Pipeline Animation — Building footprint regularization
- Tree Pipeline Animation — Crown separation with Watershed
- Road Pipeline Animation — Road network + Voronoi centerlines
| Tool Dialog | Detection Results | Classification |
|---|---|---|
![]() |
![]() |
![]() |
| Tool Dialog | Regularized Footprints | Classification |
|---|---|---|
![]() |
![]() |
![]() |
| Tool Dialog | Crown Detection | Classification |
|---|---|---|
![]() |
![]() |
![]() |
| Tool Dialog | Road Network | Centerlines |
|---|---|---|
![]() |
![]() |
![]() |
- ArcGIS Pro 3.6+ with Python 3.11+
- Spatial Analyst extension (required)
- 3D Analyst extension (required)
- For Voronoi centerlines (optional):
shapely >= 2.0,scipy,networkx,numpy
-
Download or clone this repository:
git clone https://github.com/Nickkoro21/PostProcessing-Toolbox.git
-
Copy the
toolbox/folder contents to your ArcGIS Pro project directory (next to your.aprxfile):your_project/ ├── your_project.aprx ├── PostProcessing.pyt ├── _postproc_common.py ├── _vehicle_core.py ├── _building_core.py ├── _tree_core.py ├── _road_core.py └── PostProcessing.*.pyt.xml (5 metadata files) -
In ArcGIS Pro, right-click in the Catalog pane → Add Toolbox → navigate to
PostProcessing.pyt. -
The toolbox appears with 4 tools organized by category (Vehicle, Building, Tree, Road).
The Road Analysis tool uses Voronoi medial axis centerlines for high-quality road network extraction. If the dependencies are not installed, it falls back to morphological Thin (lower quality).
To install in ArcGIS Pro's Python environment:
# Open ArcGIS Pro Python Command Prompt
pip install shapely scipy networkx- Open any of the 4 tools from the Catalog pane
- Select your classified raster (single-band, integer classes)
- Pick the class value from the auto-populated dropdown
- Provide the nDSM raster (height above ground in meters)
- Choose an output folder
- Click Run
| Input | Type | Description |
|---|---|---|
| Classified Raster | Required | Single-band integer raster from DeepLabV3/PointRend |
| Class Value | Required | Target class (auto-detected from raster) |
| nDSM Raster | Required | Normalized Digital Surface Model (meters) |
| Thermal Raster | Optional | Temperature in °C (MicaSense Altum-PT LWIR) |
| Area of Interest | Optional | Polygon or raster mask |
| Output CRS | Optional | Defaults to classified raster CRS |
Each tool creates a subfolder (vehicles/, buildings/, trees/, roads/) containing:
| Output | Format | Description |
|---|---|---|
*_results.shp |
Polygon | All features with Class and Reason fields |
*_points.shp |
Point | Centroid of each feature (optional) |
*_centerlines.shp |
Polyline | Road centerlines only (Road tool) |
*_log.json |
JSON | Full run parameters, statistics, timing |
All tools produce these attribute fields:
| Field | Type | Description |
|---|---|---|
*ID |
Long | Sequential identifier (VehicleID, BuildingID, etc.) |
Area_m2 |
Double | Polygon area in square meters |
Perim_m |
Double | Perimeter in meters |
MBR_W |
Double | Minimum Bounding Rectangle width (m) |
MBR_L |
Double | MBR length (m) |
MBR_Azim |
Double | MBR orientation (degrees) |
LW_Ratio |
Double | Length/Width ratio |
Compact |
Double | Polsby-Popper compactness (0-1) |
MEAN_nDSM |
Double | Mean height above ground (m) |
MEAN_Therm |
Double | Mean thermal temperature (°C) |
Class |
Text | Accepted class or "Rejected possible *" |
Reason |
Text | Rejection reason or empty |
The road centerline extraction uses a Voronoi diagram approach:
- Fill holes — Remove small interior holes (vehicles, shadows) below configurable area threshold
- Densify boundary — Sample polygon boundary at regular intervals
- Voronoi diagram — Compute using
scipy.spatial.Voronoi - Interior filtering — Retain only edges fully inside the polygon (the medial axis)
- Graph pruning — Iteratively remove terminal branches shorter than
prune_factor × median_road_widthusingnetworkx - Line merge — Combine surviving edges via
shapely.ops.linemerge - Smooth — PAEK smoothing for cartographic quality
For separating merged tree canopies:
- Filter by area — Only polygons above threshold (default 120 m²) are processed
- nDSM local maxima — Detect peaks with prominence filter (≥ 2 m above local minimum)
- Marker-controlled Watershed — FlowDirection + Watershed using detected peaks as seeds
- Selective splitting — Only polygons with 3+ detected peaks are split; others stay intact
- Area preservation — Split pieces clipped to original polygon boundary
- CRS handling: Output CRS is applied only after all raster operations (phases 1-3) to prevent "no valid statistics" errors during on-the-fly reprojection
- NoData exclusion: Class 0 and NoData pixels are excluded throughout the pipeline
- Memory management: Zonal statistics use a safe join pattern to handle field name collisions between nDSM and thermal joins
- Geographic CRS warning: If the output CRS uses degrees (not meters), a warning is issued since area/length calculations will be incorrect
- Environment cleanup: All arcpy environment settings (cellSize, extent, mask, outputCoordinateSystem) are reset after each tool run
If you use this toolbox in your research, please cite:
Koroniadis, N. (2026). PostProcessing Toolbox: Land cover post-processing suite
for semantic segmentation of multispectral drone imagery. MSc Thesis,
Department of Geography, University of the Aegean.
Nikolaos Koroniadis
MSc Geography and Applied Geoinformatics
University of the Aegean
Thesis Supervisor: Dr. Christos Vasilakos
- MSc Geography and Applied Geoinformatics
- Remote Sensing & GIS Research Group (RSGIS)
- Department of Geography, University of the Aegean
- Dr. Christos Vasilakos — thesis supervision and guidance throughout the research
- Anthropic Claude — AI-assisted development: code architecture design, bug detection, documentation, and interactive visualizations
- ESRI — ArcGIS Pro platform and geoprocessing framework
- University of the Aegean, RSGIS Lab — research infrastructure and drone data collection support
This project is licensed under the MIT License — see the LICENSE file for details.











