Move spatial bounds and geometry calculations to :core:domain and remove GmsExt - #3911
Open
shobhitagarwal1612 wants to merge 6 commits into
Open
Move spatial bounds and geometry calculations to :core:domain and remove GmsExt#3911shobhitagarwal1612 wants to merge 6 commits into
shobhitagarwal1612 wants to merge 6 commits into
Conversation
…move GmsExt dependencies
shobhitagarwal1612
requested a deployment
to
e2e-approval
August 28, 2026 04:28 — with
GitHub Actions
Waiting
…y and improve Geometry interface
shobhitagarwal1612
requested a deployment
to
e2e-approval
August 28, 2026 04:38 — with
GitHub Actions
Waiting
… pattern matching
shobhitagarwal1612
requested a deployment
to
e2e-approval
August 28, 2026 04:42 — with
GitHub Actions
Waiting
shobhitagarwal1612
marked this pull request as ready for review
August 28, 2026 04:48
shobhitagarwal1612
requested a deployment
to
e2e-approval
August 28, 2026 11:45 — with
GitHub Actions
Waiting
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.
Towards #3633
Description
Removes presentation-layer
GmsExt.ktand moves spherical geometry and bounding box calculations directly into:core:domain. This eliminates a Clean Architecture layer inversion where repositories and ViewModels depended on Google Maps SDK classes, while significantly reducing memory churn during map interactions.Performance Improvements
Bounds.contains(Geometry)to avoid callinggetShellCoordinates(). This eliminates ephemerallistOf(coordinates)allocations forPointLOIs and eagerArrayListflattening forMultiPolygonon camera pan/zoom updates inBaseMapViewModel.LatLngobject allocations per vertex by computing areas and bounding boxes directly on domain primitives.Functional & Architectural Changes
GmsExt.kt: Migratedarea(),center, andcontains()to pure KMP domain models (Geometry.kt,Bounds.kt).PolygonUtil.calculateSphericalPolygonAreamatchingSphericalUtil.computeAreausing Girard's theorem / polar triangle excess.Bounds.fromCoordinates,fromGeometry, andfromGeometries.Bounds.fromCoordinates(),shrink(), andcenter.BoundsTest,GeometryTest, andPolygonUtilTestcovering all edge cases.@andreia-ferreira PTAL?