Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failing test to ensure that QgsAbstractGeometry.centroid
result matches that of GEOS It doesn't, and reveals the the QGIS native centroid calculation is quite broken
- Loading branch information
e55fbeb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch. Why are they wrong. I thought we used GEOS for that.
e55fbeb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you call QgsGeometry::centroid it uses GEOS. But QgsAbstractGeometry has some native centroid methods, so calling .geometry().centroid() gives a different (wrong) result.