PostProcessing Toolbox

Land cover post-processing suite for semantic segmentation outputs

DeepLabV3 + PointRend · ResNet-101 · MicaSense Altum-PT

Architecture

Modular pipeline with shared core

All 4 tools share a common raster-to-vector pipeline (phases 0-3, 5-6, 8) implemented in _postproc_common.py. Each tool adds domain-specific phases (4 and 7) via its own core module. The UI and parameter logic live in PostProcessing.pyt.

PostProcessing.pyt
UI + parameters for all 4 tools. 1,841 lines.
_postproc_common.py
Shared phases 0,1,2,3,5,6,8. 870 lines.
_vehicle_core.py
Simplify + area/L/W classify. 289 lines.
_building_core.py
Regularize + area/nDSM classify. 330 lines.
_tree_core.py
Smooth + crown separation + classify. 614 lines.
_road_core.py
Simplify+dissolve + centerlines. 1,221 lines.

Shared pipeline

Phases that every tool runs

0
Validate inputs — CRS check, cell size, AOI extent, overlap
common
1
Extract class pixels — Con(VALUE = target, 1, 0) binary raster
common
2
Majority filter — FOUR / EIGHT / Skip, 1-5 passes
common
3
Vectorize — RasterToPolygon, NO_SIMPLIFY, SINGLE_OUTER_PART
common
4
Shape refinement — tool-specific (see each tool tab)
varies
5
Geometry + MBR — Area, Perimeter, MBR L/W/Azimuth, L/W ratio
common
6
Enrichment — Sequential ID, Compactness, ZonalStats nDSM + thermal
common
7
Classification — tool-specific accept/reject rules
varies
8
Export — CopyFeatures, centroids, JSON log, summary stats
common
Shared (_postproc_common.py)
Tool-specific (_*_core.py)

Tool comparison

What makes each tool unique

AspectVehicleBuildingTreeRoad
Phase 4SimplifyPolygonRegularizeFootprintSmoothPolygon (PAEK)Simplify + Dissolve
Phase 4.5Watershed / Grid
Phase 7Area + L/W ratioArea + nDSM minArea + nDSM minArea + nDSM max + MBR
Phase 7.5Voronoi centerlines
nDSM logicInformational onlyFloor (min height)Floor (min height)Ceiling (max height)
OutputsPolygons + pointsPolygons + pointsPolygons + pointsPolygons + centerlines + points

Requirements

ArcGIS Pro extensions and dependencies

Required
Spatial Analyst + 3D Analyst extensions. ArcGIS Pro 3.6+.
Optional (Road centerlines)
shapely, scipy, networkx, numpy — for Voronoi medial axis. Falls back to Thin if missing.
V

Vehicle analysis

Detect and classify vehicle features by area and length/width ratio

Ph 0-3
Shared
Ph 4
Simplify
Ph 5-6
Geom+Enrich
Ph 7
Classify
Ph 8
Export

Phase 4 — Simplify

SimplifyPolygon with POINT_REMOVE algorithm. Removes the pixel-staircase effect from raw vectorized polygons. The tolerance (default 0.10 m) controls how aggressively vertices are removed. Collapsed polygons (too small to survive simplification) are counted but not kept.

Phase 7 — Classification

Three criteria, applied in order:

  • Area below min (default 1.5 m²) — too small for a vehicle
  • Area above max (default 12 m²) — likely a building or merged blob
  • L/W ratio below min (default 1.5) — too square, not vehicle-shaped

Reference sizes: motorcycle 1.5-2.5 m², car 5-9 m², SUV 9-12 m².

Output fields

FieldTypeDescription
VehicleIDLongSequential identifier
Area_m2DoublePolygon area in square meters
LW_RatioDoubleMBR length / width ratio
MEAN_nDSMDoubleMean height above ground (m)
ClassTextVehicle or Rejected possible vehicle
ReasonTextArea_below_min, Area_above_max, LW_below_min, or empty
B

Building analysis

Extract and regularize building footprints with height-based classification

Ph 0-3
Shared
Ph 4
Regularize
Ph 5-6
Geom+Enrich
Ph 7
Classify
Ph 8
Export

Phase 4 — Regularize footprint

RegularizeBuildingFootprint from ArcGIS 3D Analyst enforces architectural geometry. Three methods available:

  • RIGHT_ANGLES — orthogonal edges (default, most buildings)
  • RIGHT_ANGLES_AND_DIAGONALS — allows 45-degree walls
  • ANY_ANGLE — preserves organic shapes

Tolerance (default 0.20 m) controls edge straightening aggressiveness.

Phase 7 — Classification

Four criteria with minimum nDSM height (floor logic — buildings must be elevated):

  • Area below min (default 5 m²) — too small for a building
  • Area above max (default 1000 m²) — likely a merged block
  • nDSM is NULL — reject or keep with warning (configurable)
  • nDSM below min (default 1.0 m) — too flat, not a building
T

Tree analysis

Crown detection with optional watershed or grid-based separation

Ph 0-3
Shared
Ph 4
Smooth
Ph 4.5
Crown sep.
Ph 5-7
Classify
Ph 8
Export

Phase 4 — Smooth polygons

SmoothPolygon with the PAEK algorithm produces organic, naturally curved crown shapes — unlike the angular SimplifyPolygon used for vehicles. The tolerance (default 0.30 m) controls curve tightness. Tree crowns are round in nature, so PAEK smoothing matches their actual shape better than point-removal.

Phase 4.5 — Crown separation (optional)

Splitting merged canopy polygons into individual trees

When trees grow close together, their crowns merge into large polygons in the classified raster. Three options are available (mutually exclusive):

Option 1: None (default)
No crown separation. Each polygon = one tree or merged group. Best for sparse canopy.
Option 2: Watershed
nDSM-based individual tree crown detection (ITCD). Uses local maxima as seed points.
Option 3: Grid
Simple fishnet overlay + Intersect. Deterministic, no nDSM needed. Good for uniform canopy.
R

Road analysis

Road network extraction with Voronoi medial axis centerlines

Ph 0-3
Shared
Ph 4a
Simp+Dissolve
Ph 5-6
Geom+Enrich
Ph 7
Classify
Ph 7.5
Centerlines
Ph 8
Export

Phase 4a — Simplify + Dissolve

Two steps unique to roads:

  • SimplifyPolygon (POINT_REMOVE, 0.15 m) — removes pixel staircase
  • Dissolve (SINGLE_PART) — merges all touching polygons into contiguous road segments

After dissolve, 296 raw fragments might become 45 road segments. This is essential because roads are linear features, not discrete objects.

Phase 7 — Classification

Roads use inverted nDSM logic (ceiling, not floor) plus MBR dimensions:

  • Area below min (2 m²) — noise patch
  • nDSM is NULL — reject or keep (configurable)
  • nDSM above max (0.5 m) — elevated, not a road
  • MBR length below min (3 m) — too short
  • MBR width below min (1.5 m) — too narrow

Phase 7.5 — Voronoi centerline extraction

Medial axis approach for road centerlines

The centerline extraction converts accepted road polygons into polyline features representing the road network. Two methods are available:

Primary: Voronoi medial axis
Geometrically correct. Handles junctions, bends, and variable widths. Requires shapely, scipy, networkx.
Fallback: Morphological Thin
arcpy-only. Rasterize, Thin, RasterToPolyline, TrimLine. Produces spurs at junctions.
Developed by Nikolaos Koroniadis · MSc Geography and Applied Geoinformatics · University of the Aegean
Remote Sensing & GIS Research Group · MicaSense Altum-PT · ArcGIS Pro 3.6.2