| Summary: | [GEF4] Point.getCentroid(Point...) returns wrong centroid | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Matthias Wienand <matthias.wienand> | ||||
| Component: | GEF Geometry | Assignee: | Matthias Wienand <matthias.wienand> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | matthias.wienand, nyssen | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Matthias Wienand
Created attachment 218173 [details]
Fixes the getCentroid() bug
This patch corrects the Point.getCentroid() calculations for the closing segment.
The computation of the centroid is based on assuming that the points are forming a polygon of constant density. The x and y coordinates are iteratively computed for each segment of that polygon. A typo in the computation of the coordiante values for the closing segment led to false values there. Fixed that computation. Pushed changes to master. Resolving as FIXED. |