Shape
Centers, interior points, and envelopes of shapes.
These tools describe a shape: its bounding box, centroid and a point guaranteed inside it, extra vertices along geodesic edges, and the hull, rectangle, and circle that enclose a set of points. GIS analysts and developers use them for map extents, labels, and summaries. Start with the bounding box. The classic pitfall is a box that crosses the antimeridian, where west is greater than east.
I want to find a polygon's center or a point inside it
- Polygon centroid and interior point
The center of mass of a polygon on the ellipsoid, a warning when it falls outside the shape, and a point guaranteed inside, as far from the edges as possible, for a label or a pin.
I want to find the bounding box, even across the antimeridian
- Bounding box, antimeridian-aware
The smallest latitude and longitude box around points, a line, or a polygon, written west-south-east-north, crossing the antimeridian when that is shorter and reaching a pole a polygon circles.
I want to find the hull, smallest rectangle, or smallest circle around points
- 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.
I want to add vertices so a line follows the geodesic on a flat map
- Add vertices along geodesic edges (densify)
Adds vertices along each edge of a line or polygon so no piece is longer than a set length, each on the true geodesic, so maps that draw straight segments still follow the Earth's curve.