Ticket #3419 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Make circular tool is non-deterministic

Reported by: seav Owned by: potlatch-dev@…
Priority: minor Milestone:
Component: potlatch2 Version:
Keywords: Cc:


The make circular tool is a chaotic tool since it doesn't converge on a single "answer".

Steps to reproduce:

  1. Create or select a closed polygon.
  2. Click on the make circular button several times.
  3. Observe chaotic behavior.

Potlatch 1 has the correct behavior.

Change History

comment:1 Changed 3 years ago by stevage

  • Status changed from new to closed
  • Resolution set to fixed

I haven't seen actual non-determinism, but there is something buggy in the centroid calculation that leads to the centroid sometimes being outside the polygon. That in turn leads to an oversized circle being created. You can see this effect on this way: http://www.openstreetmap.org/browse/way/62162934

Anyway, I have committed a fix that uses a much simpler way to compute a centroid. [25277]

Note: See TracTickets for help on using tickets.