geo-registry

Minimum Bounding Rectangle

The smallest-area rectangle, at any angle, that contains each feature.

Pitfall. Some engines can minimise width, length or perimeter instead of area, which gives a different rectangle.
Pitfall. Angles and areas in a geographic CRS are measured in degrees.
About this operation
Also called oriented envelope, minimum rotated rectangle, oriented minimum bounding box, Minimum Bounding Geometry (rectangle by area)
Group vector/geometry
Checks crs.measure, geometry.valid
Pitfalls 2 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input layer vector Not stated Not stated
Output output vector polygon Not stated

In each engine

Engine Tool Parameters Differences
apache-sedona sedona.sql.ST_OrientedEnvelope
  • layer → geometry
  • A Spark SQL function: arguments are columns or column names, run over a Spark DataFrame.
geopandas geopandas.GeoSeries.minimum_rotated_rectangle Not stated
  • A method of the GeoSeries: one rectangle per row.
postgis st_orientedenvelope
  • layer → #1
  • Returns a point or a line for degenerate input.
qgis native:orientedminimumboundingbox
  • layer → INPUT
  • output → OUTPUT
  • Adds the rectangle's width, height, angle, area and perimeter as fields.
sf sf::st_minimum_rotated_rectangle
  • layer → x
  • Needs GEOS 3.9 or later.
shapely shapely.oriented_envelope
  • layer → geometry
  • minimum_rotated_rectangle is the same function under its older name.
whiteboxtools MinimumBoundingBox
  • layer → input
  • output → output
  • criterion chooses what to minimise: area (the default), length, width or perimeter.
  • features (true by default) gives one rectangle per feature; false gives one for the whole layer.