Add GeoBounds and type the geography doors with Latitude and Longitude - #71
Merged
Conversation
LahaLuhem
force-pushed
the
feature/#65-add-geobounds
branch
from
August 18, 2026 13:49
6a31df0 to
537046a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #65.
GeoBoundsis a GeoJSONbboxwherewest > eastis legal rather than refused, that being howRFC 7946 §5.2 spells a box across the antimeridian.
crossesAntimeridianreports the crossing andcontainshonours it, so the case that goes wrong near ±180 is a type-level fact instead ofsomething every caller re-derives.
Geohash.boundsreturns one, so a geohash can hand back the cellit names rather than only a point inside it.
Breaking,
minted_geographymajor.GeoCoordinate.fromtook twodoubles and returned aParseOutcome; it now takes aLatitudeand aLongitudeand cannot fail.tryFromis theraw-number door, widened to
num. The range moved into the types, so it is prevented at theassembly doors and only
parsestill diagnoses it, text being where unchecked input arrives.The edges are numbers rather than two
GeoCoordinatecorners deliberately: a coordinate folds-180onto+180, right for a point and wrong for an edge, and folded corners would turn-180,-90,180,90into a meridian line. Reasoning inAPPENDIX.md#geo-bounds-value-type.Worth settling before this releases: #70 asks whether the getters get typed too. A probe says
implements doublekeeps the range, swap and generic guarantees while removing the arithmetic tax,so if it lands it can ride this same major rather than forcing a second one.