com.groupbyinc.flux.common.geo.GeoHashUtils.class Maven / Gradle / Ivy
???? 4 +com/groupbyinc/flux/common/geo/GeoHashUtils java/lang/Object GeoHashUtils.java BASE_32 [C BASE_32_STRING Ljava/lang/String; PRECISION I BITS S LAT_SCALE DAf?l?l LON_SCALEAV?l?l
MORTON_OFFSET ()V
this -Lcom/groupbyinc/flux/common/geo/GeoHashUtils; encodeLatLon (DD)J Ccom/groupbyinc/flux/common/apache/lucene/spatial/util/MortonEncoder ! encode #
" $ lat lon
longEncode (DDI)J
* 5com/groupbyinc/flux/common/apache/lucene/util/BitUtil , flipFlop (J)J . /
- 0 level msf (Ljava/lang/String;I)J java/lang/String 5 toCharArray ()[C 7 8
6 9 < indexOf (I)I > ?
6 @ c C b J hash length l (JI)J geohash precision
fromMorton morton mFlipped stringEncode (J)Ljava/lang/String; S ([C)V W
6 X geoHashLong chars (DD)Ljava/lang/String; (DDI)Ljava/lang/String; Q ]
^ N I
` Q R
b ghLong stringEncodeFromMortonLong java/lang/Exception f@( Q \
j hashedVal (JI)Ljava/lang/String; java/lang/StringBuilder n
o > append (C)Ljava/lang/StringBuilder; s t
o u toString ()Ljava/lang/String; w x
o y geoHash Ljava/lang/StringBuilder; mask mortonEncode (Ljava/lang/String;)J isEmpty ()Z ? ?
6 ? "java/lang/IllegalArgumentException ?
empty geohash ? (Ljava/lang/String;)V ?
? ? unsupported symbol [ ? -(Ljava/lang/String;)Ljava/lang/StringBuilder; s ?
o ? ] in geohash [ ? ] ? odd (II)C x y bbox L(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/geo/Rectangle; 'com/groupbyinc/flux/common/geo/GeoPoint ? fromGeohash =(Ljava/lang/String;)Lcom/groupbyinc/flux/common/geo/GeoPoint; ? ?
? ? ()I G ?
6 ? java/lang/Math ? min (II)I ? ?
? ? ( 4
? deinterleave ? /
- ?
interleave (II)J ? ?
- ? ,(J)Lcom/groupbyinc/flux/common/geo/GeoPoint; ? ?
? ? 6com/groupbyinc/flux/common/apache/lucene/geo/Rectangle ? ()D &