Lines Matching refs:hash
27 * array of neighbouring hash character maps.
53 * array of bordering hash character maps.
81 * @param string $hash a GeoHash
82 * @param boolean $asGrid Return the center point of hash grid or the grid cell as Polygon
86 public function read($hash, $asGrid = false)
88 $decodedHash = $this->decode($hash);
125 // The GeoHash is the smallest hash grid ID that fits the envelope
135 foreach ($geoHashes as $hash) {
136 if ($hash[$i] != $char) {
166 $hash = '';
206 $hash .= self::$characterTable[$chr];
210 return $hash;
217 * @param string $hash a GeoHash
220 private function decode($hash)
229 for ($i = 0, $c = strlen($hash); $i < $c; $i++) {
230 $v = strpos(self::$characterTable, $hash[$i]);
311 * @param string $hash the geohash (lowercase)
315 public static function adjacent($hash, $direction)
317 $last = substr($hash, -1);
318 $type = (strlen($hash) % 2) ? 'odd' : 'even';
319 $base = substr($hash, 0, strlen($hash) - 1);