[ 
https://issues.apache.org/jira/browse/LUCENE-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748548#action_12748548
 ] 

Wouter Heijke commented on LUCENE-1815:
---------------------------------------

To me it was major since geohashes are THE way for us to search a location 
through millions of records our index has, and small numbers do count! 

I see it this way, if a jpeg picture would not decode like it encoded would you 
accept it, also if it would be slightly different?

Right now i don't want to spend my time on finding the cause of the issue since 
i have working (google) code and I prefer doing cooler stuff like implementing 
a solution for the 'greenwich' geohash problem.

> Geohash encode/decode floating point problems
> ---------------------------------------------
>
>                 Key: LUCENE-1815
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1815
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/spatial
>    Affects Versions: 2.9
>            Reporter: Wouter Heijke
>            Priority: Minor
>
> i'm finding the Geohash support in the spatial package to be rather 
> unreliable.
> Here is the outcome of a test that encodes/decodes the same lat/lon and 
> geohash a few times.
> the format:
> action geohash=(latitude, longitude)
> the result:
> encode u173zq37x014=(52.3738007,4.8909347)
> decode u173zq37x014=(52.373799999999996,4.890934)
> encode u173zq37rpbw=(52.373799999999996,4.890934)
> decode u173zq37rpbw=(52.373799999999996,4.8909329999999995)
> encode u173zq37qzzy=(52.373799999999996,4.8909329999999995)
> if I now change to the google code implementation:
> encode u173zq37x014=(52.3738007,4.8909347)
> decode u173zq37x014=(52.37380061298609,4.890934377908707)
> encode u173zq37x014=(52.37380061298609,4.890934377908707)
> decode u173zq37x014=(52.37380061298609,4.890934377908707)
> encode u173zq37x014=(52.37380061298609,4.890934377908707)
> Note the differences between the geohashes in both situations and the 
> lat/lon's!
> Now things get worse if you work on low-precision geohashes:
> decode u173=(52.0,4.0)
> encode u14zg429yy84=(52.0,4.0)
> decode u14zg429yy84=(52.0,3.999999)
> encode u14zg429ywx6=(52.0,3.999999)
> and google:
> decode u173=(52.20703125,4.5703125)
> encode u17300000000=(52.20703125,4.5703125)
> decode u17300000000=(52.20703125,4.5703125)
> encode u17300000000=(52.20703125,4.5703125)
> We are using geohashes extensively and will now use the google code version 
> unfortunately.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to