Ironholds / geohash

Geohash generation, decoding and manipulation in R
Other
40 stars 9 forks source link

More precise gh_decode() #11

Closed TerminusBot closed 7 years ago

TerminusBot commented 7 years ago
gh_decode("wx4gfbe")
       lat      lng    lat_error    lng_error
1 40.03761 116.4928 0.0006866455 0.0006866455

lng has only 4 digital. Can we get more precise result?

restonslacker commented 7 years ago

There are more digits there than R is printing to the screen. I think if you read the help for format it will tell you how to display it. Sorry, I don't have a computer handy, just my phone. HTH

On Sat, Aug 5, 2017 at 10:42 tsai1993 notifications@github.com wrote:

gh_decode("wx4gfbe") lat lng lat_error lng_error1 40.03761 116.4928 0.0006866455 0.0006866455

lng has only 4 digital. Can we get more precise result?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Ironholds/geohash/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AFi1C9uE1Cz4i6ca4N07Tdozdy_VRr7aks5sVKlxgaJpZM4OuhOl .

Ironholds commented 7 years ago

Quite! For example:

format(gh_decode("ezs42")[1,1], digits = 10)
[1] "42.60498047"