ST_OrientedEnvelope — 返回包含几何图形的最小面积矩形。
geometry ST_OrientedEnvelope(
geometry geom )
;
SELECT ST_AsText(ST_OrientedEnvelope('MULTIPOINT ((0 0), (-1 -1), (3 2))')); st_astext ------------------------------------------------ POLYGON((3 2,2.88 2.16,-1.12 -0.84,-1 -1,3 2))
SELECT ST_AsText(ST_OrientedEnvelope( ST_Collect( ST_GeomFromText('LINESTRING(55 75,125 150)'), ST_Point(20, 80)) )) As wktenv; wktenv ----------- POLYGON((19.9999999999997 79.9999999999999,33.0769230769229 60.3846153846152,138.076923076924 130.384615384616,125.000000000001 150.000000000001,19.9999999999997 79.9999999999999))