Skip to content

Refactor: Clean up imagery layer and migrate MogTile to :core:domain - #3907

Open
shobhitagarwal1612 wants to merge 6 commits into
masterfrom
new-change
Open

Refactor: Clean up imagery layer and migrate MogTile to :core:domain#3907
shobhitagarwal1612 wants to merge 6 commits into
masterfrom
new-change

Conversation

@shobhitagarwal1612

Copy link
Copy Markdown
Member

Towards #3633

Refactors the imagery layer to decouple platform-specific dependencies, move MogTile to :core:domain, and standardize MOG zoom level handling.

Key Changes

  • Move MogTile to domain: Moved MogTile to :core:domain and extracted Android/Maps SDK logic into MogTileExt.kt.
  • Decouple tile downloading: MogTileDownloader now writes processed image bytes directly without instantiating Maps SDK Tile objects.
  • Rename & test image transformer: Renamed ImageEditor to TileImageTransformer and added unit tests.
  • Path & storage cleanup: Replaced FileUtil with injected @ApplicationContext Context in OfflineAreaRepository; moved getTilePath() to TileCoordinates.
  • Dynamic zoom levels: Exposed maxZoom on MogCollection and MogTileProvider, removing the hardcoded DEFAULT_MOG_MAX_ZOOM dependency in GoogleMapsFragment.

@andreia-ferreira PTAL?

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.05128% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.07%. Comparing base (97da8be) to head (c2c21dd).

Files with missing lines Patch % Lines
...roundplatform/android/ui/map/gms/mog/MogTileExt.kt 25.00% 2 Missing and 1 partial ⚠️
...latform/android/ui/map/gms/ClippingTileProvider.kt 0.00% 1 Missing ⚠️
...dplatform/android/ui/map/gms/GoogleMapsFragment.kt 0.00% 1 Missing ⚠️
...atform/android/ui/map/gms/mog/MogTileDownloader.kt 0.00% 1 Missing ⚠️
...platform/android/ui/map/gms/mog/MogTileProvider.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3907      +/-   ##
============================================
+ Coverage     68.98%   69.07%   +0.09%     
- Complexity     1946     1953       +7     
============================================
  Files           413      413              
  Lines         10964    10963       -1     
  Branches       1429     1430       +1     
============================================
+ Hits           7563     7573      +10     
+ Misses         2656     2644      -12     
- Partials        745      746       +1     
Files with missing lines Coverage Δ
...atform/android/repository/OfflineAreaRepository.kt 67.56% <100.00%> (ø)
...groundplatform/android/ui/map/gms/mog/MogClient.kt 48.10% <ø> (ø)
...atform/android/ui/map/gms/mog/MogSourceProvider.kt 100.00% <ø> (ø)
...ndplatform/android/ui/map/gms/mog/MogTileReader.kt 66.66% <ø> (ø)
...latform/android/util/image/TileImageTransformer.kt 92.30% <ø> (ø)
...oundplatform/domain/model/imagery/MogCollection.kt 100.00% <100.00%> (ø)
...org/groundplatform/domain/model/imagery/MogTile.kt 100.00% <100.00%> (ø)
...ndplatform/domain/model/imagery/TileCoordinates.kt 88.88% <100.00%> (+0.65%) ⬆️
...latform/android/ui/map/gms/ClippingTileProvider.kt 0.00% <0.00%> (ø)
...dplatform/android/ui/map/gms/GoogleMapsFragment.kt 18.10% <0.00%> (ø)
... and 3 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant