This stack exchange answer seems like it would work for you. https://gis.stackexchange.com/a/365955
On Fri, Feb 4, 2022 at 11:33 AM chris hermansen <clherman...@gmail.com> wrote: > Might generalizing the lines (Poiker Douglas or similar) yield four line > rectangles? > > On Thu, Feb 3, 2022, 23:44 Etienne Trimaille <etienne.trimai...@gmail.com> > wrote: > >> Maybe "oriented_bbox" to get first a proper rectangle ? >> >> https://docs.qgis.org/testing/en/docs/user_manual/expressions/functions_list.html#oriented-bbox >> >> But then, you might have some tiny leftover. It depends if you care or >> not. >> >> Otherwise, you need to use the angle at each points. >> >> I thought there is the longest line possible within a polygon, but I >> can't find it. I did it manually a few years ago. >> >> Le jeu. 3 févr. 2022 à 23:29, Dario C <dario9...@gmail.com> a écrit : >> >>> Hi, >>> I have several rectangles (almost squared) and I'd like to represent >>> their diagonals. >>> >>> I started to do with geometry generator with: >>> make_line(point_n($geometry,1),point_n($geometry,4)) >>> and >>> make_line(point_n($geometry,2),point_n($geometry,5)) >>> >>> Unfortunately, even if they look rectangular, actually they have more >>> then 4 points and, moreover, points do not always have the same order. >>> >>> here below an example: >>> [image: image.png] >>> >>> Is there any expression in order to pick the two longest segments >>> connecting all the points of the geometry? >>> >>> >>> Thanks >>> _______________________________________________ >>> Qgis-user mailing list >>> Qgis-user@lists.osgeo.org >>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user >>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >>> >> _______________________________________________ >> Qgis-user mailing list >> Qgis-user@lists.osgeo.org >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >> > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user > -- Sent from a phone. Amazing! But possibly garbled. Sebastian Gutwein Regenerative Design Group 1 Chevalier Ave Greenfield MA b...@rdgland.com (631) 241-1018
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user