FIX Circularise bug. There was an odd bug that caused the centroid to be calculated...
authorSteve Bennett <stevagewp@gmail.com>
Sat, 12 Feb 2011 17:16:48 +0000 (17:16 +0000)
committerSteve Bennett <stevagewp@gmail.com>
Sat, 12 Feb 2011 17:16:48 +0000 (17:16 +0000)
commit90ba85ab8d73dcd7e64ae371176ff95225bcf011
tree2b3b10730df7821631ac6d64b0dbaf4fe00f0f78
parentd9b299054eed8915a7fc5cfc7c81338aad6a547c
FIX Circularise bug. There was an odd bug that caused the centroid to be calculated incorrectly, yielding oversized, misplaced circles. Inspired by openstreetmap.org/user/alexz/diary/13054, I replace the centroid calculation algorithm with a much simpler "average of X and Y". In my testing, it yields good results. It's technically "incorrect" for heavily skewed polygons, but IMHO there the result is still acceptable, and it's hardly what Circularise is designed for.
net/systemeD/potlatch2/tools/Circularise.as