New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/#1144 - using the new MapTileAreaList class in CacheManager (refactoring) #1149

Merged
merged 1 commit into from Oct 10, 2018

Conversation

Projects
None yet
1 participant
@monsieurtanuki
Collaborator

monsieurtanuki commented Sep 7, 2018

New class:

  • TileSystemWebMercatorTest: slightly unrelated unit test class about class TileSystemWebMercatorTest

Impacted classes:

  • CacheManager: deprecated methods getMapTileFromCoordinates and getCoordinatesFromMapTile in favor of new TileSystem methods; replaced in method getTilesCoverageIterable an on-the-fly IterableWithSize<Long> class with an instance of MapTileAreaList; made static method getTilesRect public
  • CacheManagerTest: created new test methods testGetTilesRectSingleTile and testGetTilesRectWholeWorld; used now public method CacheManager.getTilesRect in method getTilesCoverage
  • MapTileAreaTest: slightly unrelated new testCorners method
  • TileSystem: created methods getTileXFromLongitude, getTileYFromLatitude, getLatitudeFromTileY and getLongitudeFromTileX, whose code was more or less previously in class CacheManager but will be more comfortable here, because we can handle other tile systems, and because even in the web mercator case the conversion formula was slightly deprecated (as we now use a more precise projection function); created helper method clipTile
  • TileSystemWebMercator: very slightly fine-tune min and max latitude values, so that their projection into [0,1] fit into [0,1]
feature/#1144 - using the new MapTileAreaList class in CacheManager (…
…refactoring)

New class:
* `TileSystemWebMercatorTest`: slightly unrelated unit test class about class `TileSystemWebMercatorTest`

Impacted classes:
* `CacheManager`: deprecated methods `getMapTileFromCoordinates` and `getCoordinatesFromMapTile` in favor of new `TileSystem` methods; replaced in method `getTilesCoverageIterable` an on-the-fly `IterableWithSize<Long>` class with an instance of `MapTileAreaList`; made `static` method `getTilesRect` `public`
* `CacheManagerTest`: created new test methods `testGetTilesRectSingleTile` and `testGetTilesRectWholeWorld`; used now `public` method `CacheManager.getTilesRect` in method `getTilesCoverage`
* `MapTileAreaTest`: slightly unrelated new `testCorners` method
* `TileSystem`: created methods `getTileXFromLongitude`, `getTileYFromLatitude`, `getLatitudeFromTileY` and `getLongitudeFromTileX`, whose code was more or less previously in class `CacheManager` but will be more comfortable here, because we can handle other tile systems, and because even in the web mercator case the conversion formula was slightly deprecated (as we now use a more precise projection function); created helper method `clipTile`
* `TileSystemWebMercator`: very slightly fine-tune min and max latitude values, so that their projection into [0,1] fit into [0,1]

@monsieurtanuki monsieurtanuki requested a review from spyhunter99 Sep 7, 2018

@monsieurtanuki monsieurtanuki merged commit 78d28e4 into master Oct 10, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment