You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in qgis3.4 and ubuntu16
with geometries projected in 25831
the angle obtained by the function orientedMinimumBoundingBox is not the same as the obtained using the function angleBetweenThreePoints
And this second is the correct
@300000kms QgsGeometryUtils.angleBetweenThreePoints return an angle in radians. You converted it in degrees, but orientedMinimumBoundingBox() returns an angle in degrees converted from angle in radians clockwise from the north direction.
in qgis3.4 and ubuntu16
with geometries projected in 25831
the angle obtained by the function orientedMinimumBoundingBox is not the same as the obtained using the function angleBetweenThreePoints
And this second is the correct
oriented minimum bounding box
geom, area, angle, width, height = z.geometry().orientedMinimumBoundingBox()
angle manually calculated
a = math.degrees(QgsGeometryUtils.angleBetweenThreePoints(
geom.vertexAt(0).x(),geom.vertexAt(0).y(),
geom.vertexAt(1).x(),geom.vertexAt(1).y(),
geom.vertexAt(1).x(),geom.vertexAt(1).y()+1000000,
))
a != angle
a != angle-180
The text was updated successfully, but these errors were encountered: