fix center coordinates of pmtiles writer (#769)

pull/770/head
Brandon Liu 2023-12-28 19:43:00 +08:00 zatwierdzone przez GitHub
rodzic 3dea746ff0
commit a233e683bd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -199,8 +199,8 @@ public final class WriteablePmtiles implements WriteableTileArchive {
(int) (bounds.getMaxX() * 10_000_000),
(int) (bounds.getMaxY() * 10_000_000),
(byte) zoom,
(int) center.x * 10_000_000,
(int) center.y * 10_000_000
(int) (center.x * 10_000_000),
(int) (center.y * 10_000_000)
);
LOGGER.info("Writing metadata and leaf directories...");

Wyświetl plik

@ -54,13 +54,13 @@ class PmtilesTest {
Pmtiles.TileType tileType = Pmtiles.TileType.MVT;
byte minZoom = 1;
byte maxZoom = 3;
int minLonE7 = -10_000_000;
int minLatE7 = -20_000_000;
int maxLonE7 = 10_000_000;
int maxLatE7 = 20_000_000;
int minLonE7 = -10_100_000;
int minLatE7 = -20_200_000;
int maxLonE7 = 10_100_000;
int maxLatE7 = 20_200_000;
byte centerZoom = 2;
int centerLonE7 = -5_000_000;
int centerLatE7 = -6_000_000;
int centerLonE7 = -5_500_000;
int centerLatE7 = -6_600_000;
Pmtiles.Header in = new Pmtiles.Header(
specVersion,
@ -220,8 +220,8 @@ class PmtilesTest {
"MyVersion",
"baselayer",
TileArchiveMetadata.MVT_FORMAT,
new Envelope(1, 2, 3, 4),
new CoordinateXY(5, 6),
new Envelope(1.1, 2.2, 3.3, 4.4),
new CoordinateXY(5.5, 6.6),
7d,
8,
9,