Packs / geospatial-public
bounding-box-and-centroid
summarise a set of points: bounding box, centroid and a GeoJSON bbox ready for map fitBounds
Install
logicpacks pack use geospatial-public/bounding-box-and-centroidget_pack geospatial-public/bounding-box-and-centroidThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
python-stdlib - Checks: 1 in
outcome/checks.yaml - Code:
extent.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
Summarise a set of points: bounding box, centroid and a GeoJSON bbox ready for map fitBounds.
Steps
- Run extent.py on your points.
- Use bbox with map.fitBounds; centroid as the default map centre.
Edge cases
- Points spanning the antimeridian give a misleading bbox.
- Centroid of points is not the centre of the area they cover.
Don'ts
- Don't average raw longitudes across +/-180.
Routes (free first)
python-stdlib:code/extent.py(no install).