Skip to content
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

Upgrade planetiler-openmaptiles to pull in tile size optimizations #672

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -498,52 +498,6 @@ public String toJson() {
}
}

/**
* Contents of a row of the tiles table, or in case of compact mode in the tiles view.
*
* @deprecated Use {@link Tile} instead
*/
@Deprecated(forRemoval = true)
public record TileEntry(TileCoord tile, byte[] bytes) implements Comparable<TileEntry> {

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}

TileEntry tileEntry = (TileEntry) o;

if (!tile.equals(tileEntry.tile)) {
return false;
}
return Arrays.equals(bytes, tileEntry.bytes);
}

@Override
public int hashCode() {
int result = tile.hashCode();
result = 31 * result + Arrays.hashCode(bytes);
return result;
}

@Override
public String toString() {
return "TileEntry{" +
"tile=" + tile +
", bytes=" + Arrays.toString(bytes) +
'}';
}

@Override
public int compareTo(TileEntry o) {
return tile.compareTo(o.tile);
}
}

/** Contents of a row of the tiles_shallow table. */
private record TileShallowEntry(TileCoord coord, int tileDataId) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,6 @@ public static Geometry decodeSilently(VectorTile.VectorGeometry geom) {
}
}

@Deprecated(forRemoval = true)
public static Set<Mbtiles.TileEntry> getAllTiles(ReadableTileArchive db) {
return db.getAllTiles().stream().map(t -> new Mbtiles.TileEntry(t.coord(), t.bytes())).collect(Collectors.toSet());
}

public static Set<Tile> getTiles(ReadableTileArchive db) {
return db.getAllTiles().stream().collect(Collectors.toSet());
}
Expand Down
Loading