inset

abstract fun inset(polygon: DrawnPolygon, distanceMeters: Double, newVertexId: () -> VertexId): List<List<Vertex>>

The rings of what is left of polygon when everything within distanceMeters of an edge is taken away, as the model keeps them (see OverlayEngine): the outline of each part followed by its holes. The distance is in metres on the ground, the same in every direction; an outline is moved in by it, and a hole is moved outwards (so it grows), the corners staying sharp (a mitre, as a setback line is drawn). An empty list means nothing is left (the plot is narrower than twice the distance). Every corner of the result is a new one: they take their ids from newVertexId.

Throws

if polygon is not a valid polygon.

if distanceMeters is negative or not a number, or the plot crosses the antimeridian (longitude 180).