kopia lustrzana https://github.com/JOSM/MapWithAI
PMTiles: invert y axis of tile coordinates
The y axis of XYZ tiles is oriented from north to south. When enumerating tiles for a given bounding box, the y coordinates have to be enumerated from north/top to south/bottom.pull/44/head
rodzic
68b9ff91c1
commit
d13d61f13c
|
@ -135,7 +135,7 @@ public class BoundingBoxMapWithAIDownloader extends BoundingBoxDownloader {
|
|||
final var tile1 = tileFromLatLonZoom(left, bottom, zoom);
|
||||
final var tile2 = tileFromLatLonZoom(right, top, zoom);
|
||||
return IntStream.rangeClosed(tile1.x, tile2.x)
|
||||
.mapToObj(x -> IntStream.rangeClosed(tile1.y, tile2.y).mapToObj(y -> new TileXYZ(x, y, zoom)))
|
||||
.mapToObj(x -> IntStream.rangeClosed(tile2.y, tile1.y).mapToObj(y -> new TileXYZ(x, y, zoom)))
|
||||
.flatMap(stream -> stream);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue