geoprimsField-grade geospatial math

Hull, bounding rectangle, and enclosing circle

Around a set of points: the convex hull, the smallest rotated rectangle, and the smallest circle that holds them all, with its center and geodesic radius.

40.0016145°

The smallest circle around the points has a radius of 523.257 m. The smallest rectangle is 930.897 m by 682.729 m.

Circle center longitude
Circle radius
Hull corners
Hull area
Rectangle length
Rectangle width
Provenance
Computed by
geometry.shape.enclosing 1.0.0, core 0.1.0
Model
Circle: Welzl's smallest circle on an azimuthal equidistant plane, re-centered on its result until the circle's center is the plane's own; that plane keeps distances and directions from its center, so the fixed point is the smallest geodesic circle (Karney 2013). Hull: great-circle hull of the points on the sphere, by monotone chain in a gnomonic projection from their mean. Rectangle: the smallest-area rectangle on an edge of the hull, on the equidistant plane at the points' center
Accuracy
The circle's radius is an exact geodesic distance, the center converged to 1 mm; the rectangle is planar on the equidistant map, true for spans of tens of kilometers to about 1 part in 10⁶
Notes
None
Cites
Karney, C. F. F., Journal of Geodesy, Algorithms for geodesics

Something look off?

Your values

Showing an example. Change anything.
KML, KMZ, GPX, GeoJSON, CSV, WKT, or WKB — or drop it on the box. Read on this device.
How we got thisFormula, worked example, sources, and proof

Model: Circle: Welzl's smallest circle on an azimuthal equidistant plane, re-centered on its result until the circle's center is the plane's own; that plane keeps distances and directions from its center, so the fixed point is the smallest geodesic circle (Karney 2013). Hull: great-circle hull of the points on the sphere, by monotone chain in a gnomonic projection from their mean. Rectangle: the smallest-area rectangle on an edge of the hull, on the equidistant plane at the points' center

Accuracy: The circle's radius is an exact geodesic distance, the center converged to 1 mm; the rectangle is planar on the equidistant map, true for spans of tens of kilometers to about 1 part in 10⁶

When to use this: Use this to put a shape around a set of positions: the coverage circle for a set of sightings, the smallest area holding a survey's control points, the footprint of a swarm or a fleet, the block a site occupies. Three answers come back because they suit different jobs — a circle is what a range or a broadcast covers, the convex hull is the tightest area that holds everything, and the smallest rotated rectangle is how a field, a runway or a site plan is usually described.

Limitations: All three are computed on one plane placed at the points, so they are meant for spreads of tens of kilometres rather than continental ones; the circle's radius is then an exact geodesic distance while the rectangle stays planar. The convex hull holds every point and says nothing about how they are distributed inside it: one outlier stretches all three answers, and none is a summary of where the points mostly are. Collinear or nearly collinear points give a hull and a rectangle that degenerate to a line, with zero area and zero width, which is correct. Where the hull is a triangle the smallest rectangle is not unique — all three edge-flush rectangles have exactly the same area — so the sides returned are one valid choice among equals.

Worked example: Seven survey points. Source: checked against GEOS 3.11.4 through shapely — its own minimum_bounding_circle, convex_hull and minimum_rotated_rectangle — over twelve point sets, agreeing on every hull corner count, on the circle radius to 2.5e-8 relative, on the hull area to 5.7e-7, and placing the circle's centre within 0.8 m over a 20 km scatter.

You enter

Points
40, -105 40.004, -104.996 40.001, -104.99 39.997, -104.993 40.002, -104.994 39.999, -104.998 40.006, -104.992

You get

Circle center latitude
40.0016145°
Circle center longitude
-104.9942432°
Circle radius
523.257 m
Hull corners
6
Hull area
0.46459499 km²
Rectangle length
930.897 m
Rectangle width
682.729 m
Rectangle direction
33.032°

Review: Not yet independently reviewed by a GIS professional.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources