buildPolygonGeometryWithHoles

fun buildPolygonGeometryWithHoles(boundary: List<Mercator>, holes: List<List<Mercator>> = emptyList()): PolygonGeometry?

Builds a Carto PolygonGeometry from an explicit outer boundary and an optional set of hole (inner ring) loops, producing a donut / multi-hole polygon when holes are supplied and a solid polygon otherwise.

This is the holes-aware plot hook used by the alerts impacted-area overlay path, which plots arbitrary server-supplied shapes that are NOT backed by a CMS Entity (and therefore cannot go through populatePolygon). Coordinates are already in Mercator; conversion to Carto map positions reuses PlotHelper.convert / PlotHelper.convertNested so it stays consistent with entity polygon plotting.

Return

a PolygonGeometry, or null when boundary is empty

Parameters

boundary

the outer ring coordinates of the polygon

holes

the hole (inner ring) loops cut out of the boundary; pass an empty list (the default) for a solid polygon