3

I want to create bounding boxes around polygons, the bounding boxes will then be used in a ST_Hausdorffdistance to determain the squarness of every polygon. My first choice is using the ST_Envelope function but the problem with this is that all the envelopes are orientated to the north.

The result is the following image.

bouding box created with ST_Envelope

The following image is how I would like it to look.

bouding box created with minimum bounding geometry tool in ArcGIS

This is created with the Minimum bounding geometry tool in ArcGIS. Is there any possibilty to do this in PostGIS?

I tried doing it with the Box2D function in PostGIS, but I can't seem to find the way to save the geometry to the geom column?

Timon
  • 31
  • 2
  • Maybe try this? https://gis.stackexchange.com/a/133662/18189 – dbaston Apr 19 '17 at 20:51
  • 1
    Or also: https://trac.osgeo.org/postgis/ticket/3176 – dbaston Apr 19 '17 at 20:53
  • This question does specifically ask for a PostGIS solution. But the question listed as a duplicate does not provide such a solution. (@dbaston's second comment, linking to the PostGIS trac, does though.) – csd Apr 21 '17 at 02:51

0 Answers0