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
QGIS 3.12 / Windows 10
Lately I have been using Oriented Minimum Bounding Box a lot and found out it sometimes produces a totally wrong output. I guess the bug happens in the low-level part of the algorithm implementation as it persists with both QgsGeometry.orientedMinimumBoundingBox() method of Python API and when calling corresponding processing algo, regardless of the CRS used (tried with EPSG:3857, EPSG:32631 and WGS 84).
How to reproduce:
Use the following WKT geometry (EPSG:32631): Polygon ((-167581.30771802365779877 12253.1009764485170308, -169728.33899063381250016 11811.64286796574924665, -169728.21535189682617784 10929.38266212840426306, -169311.85422288533300161 10223.62778342491401418, -168260.27974171470850706 10709.01371703742006503, -159956.56253779400140047 12916.02958690263949393, -167581.30771802365779877 12253.1009764485170308))
Run QgsGeometry.orientedMinimumBoundingBox() on a newly constructed geometry or add the geometry to a Polygon layer (EPSG:32631) and use Oriented minimum bounding box tool from Processing Toolbox.
In both cases, you should receive the following result:
QGIS 3.12 / Windows 10
Lately I have been using Oriented Minimum Bounding Box a lot and found out it sometimes produces a totally wrong output. I guess the bug happens in the low-level part of the algorithm implementation as it persists with both QgsGeometry.orientedMinimumBoundingBox() method of Python API and when calling corresponding processing algo, regardless of the CRS used (tried with EPSG:3857, EPSG:32631 and WGS 84).
How to reproduce:
Use the following WKT geometry (EPSG:32631):
Polygon ((-167581.30771802365779877 12253.1009764485170308, -169728.33899063381250016 11811.64286796574924665, -169728.21535189682617784 10929.38266212840426306, -169311.85422288533300161 10223.62778342491401418, -168260.27974171470850706 10709.01371703742006503, -159956.56253779400140047 12916.02958690263949393, -167581.30771802365779877 12253.1009764485170308))
Run QgsGeometry.orientedMinimumBoundingBox() on a newly constructed geometry or add the geometry to a Polygon layer (EPSG:32631) and use Oriented minimum bounding box tool from Processing Toolbox.
In both cases, you should receive the following result:
geometry (WKT)
Polygon ((-2326.23927114296566288 8046.58608674397964933, 5786.00995210356086318 12863.23406304659511079, 3714.32692187554675911 16352.38442974641657202, -4397.92230137097976694 11535.73645344379838207, -2326.23927114296566288 8046.58608674397964933))
height:
4057.836968
width:
9434.441435
area (sq m in EPSG:32631):
38283425.227139
perimeter
26984.556806
angle:
149.300277
Some general QGIS info:
![image](https://user-images.githubusercontent.com/60332001/82618708-808c2500-9bdc-11ea-96cc-ef2a644805ea.png)
The text was updated successfully, but these errors were encountered: