Blog/

Multipolygon vs single polygon: modeling a courtyard building footprint

Looking straight up from inside a building's enclosed courtyard, with the four surrounding facades framing a patch of sky.

A courtyard building breaks the assumption baked into most footprint pipelines: that a building is one closed ring. The moment a structure wraps around an open interior space, like a U-shaped school, a hollow-square apartment block, or an old mill with a central yard, you have to decide how that shape lives in your schema. Get it wrong and every downstream calculation that reads footprint area, from impervious-surface totals to solar-potential models, counts square meters that are empty courtyard, not roof.

Interior ring or separate feature

There are two ways to encode a building with a courtyard, and they answer different questions.

A polygon with an interior ring (the "donut polygon") is one feature: a single exterior boundary plus one or more interior rings marking the courtyard as a hole. In GeoJSON this is still geometry type Polygon, just with a coordinates array that has more than one ring: the first is the outer boundary, the rest are holes. In a shapefile, the same building is one record, and ring orientation (clockwise exterior, counter-clockwise interior, per the shapefile spec) is what tells a reader which ring cuts out which. This is the right model when the structure is genuinely one contiguous building wrapped around a shared courtyard. One parcel, one roofline, one footprint area that correctly excludes the open center.

A MultiPolygon is for something structurally different: multiple separate building parts that get rolled up under one record because they share an address, a parcel ID, or a BIN, but aren't physically connected. Think two wings of a hospital complex linked only by an underground tunnel, or a rowhouse block digitized as one record for a single owner. Each part is its own closed ring with no shared boundary, bundled into one MultiPolygon feature.

The failure mode we see most is using MultiPolygon where a donut polygon belongs, representing a courtyard building as several disconnected blobs instead of one ring with a hole. It digitizes fine and looks plausible on a basemap, but it silently inflates perimeter counts, breaks adjacency logic that expects one footprint per contiguous structure, and makes any later join against parcel or address data harder to reconcile.

Why the distinction matters downstream

If your footprint layer feeds impervious-surface or stormwater models, a courtyard coded as solid fill overstates roof area and understates the open ground that absorbs runoff. If it feeds solar-potential or rooftop-area estimates, the same error inflates usable roof space by the size of the courtyard. If it feeds any process that counts "number of buildings" per parcel, a courtyard mis-split into a MultiPolygon can double- or triple-count a single structure.

This is also where VHR imagery earns its keep. At sub-meter resolution, the shadow line around an interior courtyard is usually sharp enough to trace as a distinct ring rather than guess at from a lower-resolution tile. Getting that ring right, a hole in one polygon rather than a seam between several, is a decision made at digitizing time. A buffer or a dissolve run afterward won't rebuild a courtyard that was split into separate pieces at capture.

A quick way to check your own data

If you're auditing an existing building layer: pull a sample of footprints flagged as MultiPolygon and check whether the parts touch or nearly touch along a shared wall. If they do and there's an enclosed gap in the middle, that record should probably be a single polygon with an interior ring instead. If the parts are genuinely separate structures sharing an ID, MultiPolygon is correct as-is. Either way, document the rule in your schema notes, because the next analyst to touch the layer won't know which convention you used unless you say so.

For a base layer you're not maintaining by hand, Building Footprints vectorizes structures straight from VHR imagery into this kind of ring-correct geometry, delivered annually as GeoJSON or Shapefile, so courtyards come through as holes rather than guesswork.

← Back to the blog