Files
notifications-admin/app
Chris Hill-Scott 3470c5bb31 Make simplification of polygons more sophisticated
Simplifying polygons means reducing the number of points used to render
them. This commit implements simplification such that, for any given
input polygons, the combined point count of the simplified polygons is
less than 100.

When simplifying the polygons we are trying to get the smallest number
of points while meeting these two rules:
1. No part of the area the user has chosen can be cut off
2. The area of the simplified polygon should be as small as possible

This commit introduces two techniques we weren’t using before:
1. Dilating and eroding the area to fill in concave details of the
   shape, like inlets and harbours[1]
2. Making the simplification threshold proportionate to the perimeter of
   all polygons, so bigger and crinklier polygons get more
   simplification applied

It also shows the estimated bleed as a separate polygon. This lets us
make it bigger (so it’s more closer the the approximate bleed) without
having to send a bigger area to the CBC and compounding the amount of
actual bleed.

1. Inspired by this blog post about ‘removing the crinkley bits’ from
   Vancouver Island:
   http://blog.cleverelephant.ca/2010/11/removing-complexities.html
2020-08-26 09:04:54 +01:00
..
2020-08-14 11:29:38 +01:00