Closed kevbot1000 closed 8 years ago
I found that this happens because the polygon centroid calculation, which is used as the first guess, has some floating point errors so it ends up not being exactly in the center of the rectangle — -117.2018749838539
and not -117.201875
latitude. The algorithm then proceeds to find a slightly better solution in terms of distance to the polygon (0.0020549999999985857
compared to 0.002054995497083212
).
I'm getting suboptimal centroids for non-skewed rectangular polygons (horizontal and vertical).
Coordinates: 32.71997,-117.19310 32.71997,-117.21065 32.72408,-117.21065 32.72408,-117.19310