[postgis-users] Get the minimum rectangle bounding a geometry

Alessandro Candini candini at meeo.it
Tue Feb 21 06:43:09 PST 2012


On 02/21/2012 03:31 PM, Sandro Santilli wrote:
> On Tue, Feb 21, 2012 at 03:07:51PM +0100, Alessandro Candini wrote:
>> Hi list.
>>
>> Is there a way to obtain the minimum rectangle containing a geometry?
>>
>> With ST_Envelope I get a rectangle, but is not the one with the
>> minimum area...
> You mean a possibli rotated rectangle ?
>
> --strk;
>
>    ,------o-.
>    |   __/  |    Delivering high quality PostGIS 2.0 !
>    |  / 2.0 |    http://strk.keybit.net
>    `-o------'
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

Yeah, exactly.

Maybe I can obtain it using a succession of functions already 
implemented like ST_ConvexHull, ST_ShoortestLine, ST_LongestLine....

But I don't know the algorithm to use, just guessing...

I saw also the routine ST_MinimumBoundingCircle, maybe I need a 
simplified version of that...

Any hints?



More information about the postgis-users mailing list