Tuesday, 4 February 2020

postgis - Retrieve polygon smallest MBR


I have a postgis table containing polygons. I want to transform my polygons to 4 points polygons : retrieve the smallest MBR.


Here comes an illustration of what I want :



alt text


My original polygon is in pink color. I guess, it will be quite easy to get the MBR (with ST_Envelope and BBox function) But is there an easy way to get what I want?


Any ideas? Many thanks




No comments:

Post a Comment