Skip to content

Commit

Permalink
promote longer box in case of tie
Browse files Browse the repository at this point in the history
  • Loading branch information
roya0045 committed Apr 3, 2021
1 parent c260136 commit 40c6c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsinternalgeometryengine.cpp
Expand Up @@ -1491,7 +1491,7 @@ QgsGeometry QgsInternalGeometryEngine::orientedMinimumBoundingBox( double &area,

QgsRectangle bounds = hull->boundingBox();
double currentArea = bounds.width() * bounds.height();
if ( currentArea < area )
if ( currentArea < area || ( qgsDoubleNear(currentArea, area, currentArea * 0.0000000001 ) && height < bounds.height() ) )
{
minRect = bounds;
area = currentArea;
Expand Down

0 comments on commit 40c6c5f

Please sign in to comment.