Adaptively transform polygon edges through a potentially nonlinear mapping.
This numerical helper supplies points only; hosts decide styling and rendering.
Subdivision compares mapped midpoints with straight segments in destination
space, which avoids treating nonlinear CRS conversion as a single matrix.
Parameters
polygon: readonly (readonly[number,number])[]
Boundary vertices in order, without repeating the first vertex.
convert: (point:[number,number])=>[number,number]
Exact source-to-destination coordinate mapping.
tolerance: number
Positive maximum midpoint deviation in destination units.
Returns [number,number][]
Transformed/subdivided boundary without a repeated closing vertex.
Throws
Error on nonfinite projection output, more than 20,000 segment visits,
or failure to meet tolerance within 16 subdivision levels. Do not draw a
misleading straight-edge footprint after a projection-domain failure.
Adaptively transform polygon edges through a potentially nonlinear mapping.
This numerical helper supplies points only; hosts decide styling and rendering. Subdivision compares mapped midpoints with straight segments in destination space, which avoids treating nonlinear CRS conversion as a single matrix.