static String fromLongToString ( long hash ) { int length = ( int ) ( hash & 0xf ) ; if ( length > 12 || length < 1 ) throw new IllegalArgumentException ( "invalid long geohash " + hash ) ; char [ ] geohash = new char [ length ] ; for ( int pos = 0 ; pos < length ; pos ++ ) { geohash [ pos ] = BASE32 . charAt ( ( ( int ) ( hash >>> 59 ) ) ) ; hash <<= 5 ; } return new String ( geohash ) ; }
Takes a hash represented as a long and returns it as a string .