[QGIS-Developer] MinimumRectangle implementation

Paul Jobling paul.jobling at gmail.com
Tue Jun 6 01:43:42 PDT 2017


I am implementing geo in the Kognitio WX2 database using GEOS as a backend,
though I am using my own code for many things. One of those things is
ST_MinimumRectangle, which I have implemented as the rectangle with the
smallest area that encloses the geometry. This is different to the
implementation that I see you have recently added, which extrapolates from
the MinimumDiameter property.



For example, ST_MinimumRectangle ('POLYGON((1 2, 3 0, 5 2, 3 2, 2 3, 1
2))') has an area of 9.6 (and a perimeter of 12.65) using the
MinimumDiameter implementation, whereas my implementation finds the actual
minimum – with an area of 8 (and perimeter of 11.31) - it is POLYGON ((5 2,
3 0, 1 2, 3 4, 5 2)) rather than POLYGON((1.4 3.2, 0.6 0.8, 4.2 -0.4,5 2,
1.4 3.2)).



My question is why has this implementation been decided on – is it just
that MimimumDiameter is already present? Or is there some other reason due
to some standard?


Regards,



Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170606/5d7bd7e2/attachment-0001.html>


More information about the QGIS-Developer mailing list