PHP 클래스 Geohash, UK-Postcodes

저자: Keisuke SATO
파일 보기 프로젝트 열기: pezholio/UK-Postcodes 1 사용 예제들

공개 메소드들

메소드 설명
Geohash ( )
decode ( $hash ) Decode a geohash and return an array with decimal lat,long in it
encode ( $lat, $long ) Encode a hash from given lat and long

비공개 메소드들

메소드 설명
binDecode ( $binary, $min, $max ) decodes binary encoding of number as detailed in http://en.wikipedia.org/wiki/Geohash#Example removing the tail recursion is left an exercise for the reader
binEncode ( $number, $min, $max, $bitcount ) create binary encoding of number as detailed in http://en.wikipedia.org/wiki/Geohash#Example removing the tail recursion is left an exercise for the reader
calcError ( $bits, $min, $max ) What's the maximum error for $bits bits covering a range $min to $max
precision ( $number ) * returns precision of number precision of 42 is 0.5 precision of 42.4 is 0.05 precision of 42.41 is 0.005 etc

메소드 상세

Geohash() 공개 메소드

public Geohash ( )

decode() 공개 메소드

Decode a geohash and return an array with decimal lat,long in it
public decode ( $hash )

encode() 공개 메소드

Encode a hash from given lat and long
public encode ( $lat, $long )