public static double getZoomFromWorldBounds(Envelope worldBounds) {
    double maxEdge = Math.max(worldBounds.getWidth(), worldBounds.getHeight());
    return Math.max(0, -Math.log(maxEdge) / Math.log(2));
  }
Returns an approximate zoom level that a map should be displayed at to show all of {@code envelope}, specified in
web mercator coordinates.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/GeoUtils.java