public int getLevelForDistance(double dist) {if (dist == 0)return maxLevels;final int level = GeohashUtils.lookupHashLenForWidthHeight(dist, dist);return Math.max(Math.min(level, maxLevels), 1);}
public override int GetLevelForDistance(double dist){if (dist == 0){return m_maxLevels;}for (int i = 0; i < m_maxLevels - 1; i++){if (dist > levelW[i] && dist > levelH[i]){return i + 1;}}return m_maxLevels;}