Skip to content

Commit

Permalink
Add highest zoom level to tests, add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Oct 17, 2023
1 parent 40dc279 commit 3b769bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public double getLon(int i) {
public TIntList getPointsInEnvelope (Envelope envelopeFixedDegrees) {
// Convert fixed-degree envelope to floating, then to world-scale web Mercator pixels at this grid's zoom level.
// This is not very DRY since we do something very similar in the constructor and elsewhere.
// These are the integer pixel numbers containing the envelope, so iteration below must be inclusive of the max.
int west = lonToPixel(fixedDegreesToFloating(envelopeFixedDegrees.getMinX()), zoom);
int east = lonToPixel(fixedDegreesToFloating(envelopeFixedDegrees.getMaxX()), zoom);
int north = latToPixel(fixedDegreesToFloating(envelopeFixedDegrees.getMaxY()), zoom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WebMercatorExtentsTest {
* digits (as when they are stored in a database or serialized over the wire).
*/
@ParameterizedTest
@ValueSource(ints = {9, 10, 11})
@ValueSource(ints = {9, 10, 11, 12})
void wgsMercatorStability (int zoom) {
Envelope wgsEnvelope = new Envelope();
wgsEnvelope.expandToInclude(10.22222222, 45.111111);
Expand All @@ -49,7 +49,7 @@ void wgsMercatorStability (int zoom) {
* one cell (rather than zero cells). Also check an envelope with a tiny nonzero envelope away from cell edges.
*/
@ParameterizedTest
@ValueSource(ints = {9, 10, 11})
@ValueSource(ints = {9, 10, 11, 12})
void singleCellExtents (int zoom) {
Envelope wgsEnvelope = new Envelope();

Expand Down

0 comments on commit 3b769bb

Please sign in to comment.