List of usage examples for com.google.common.geometry S2Cap fromAxisArea
public static S2Cap fromAxisArea(S2Point axis, double area)
From source file:com.norman0406.slimgress.API.Common.Utils.java
public static String[] getCellIdsFromLocationArea(Location location, double areaM2, int minLevel, int maxLevel) { final double radius_m2 = 6371 * 1000; final double sr = areaM2 / (radius_m2 * radius_m2); S2LatLng pointLatLng = S2LatLng.fromE6(location.getLatitude(), location.getLongitude()); S2Cap cap = S2Cap.fromAxisArea(pointLatLng.toPoint(), sr); return getCellIdsFromRegion(cap, minLevel, maxLevel); }