geohash.org Short links for referencing a position
#1
Posted 26 February 2008 - 08:05 AM
but just recently I've managed to finish it (it's not a big system, but the
time has been on the short side).
Basically, http://geohash.org is a site that allows a pair of latitude/longitude
to be encoded as a short string, in a way that enables it to be used in
references pointing to specific places in a practical form. The person
following the link can check where the place is located (through embedded
google maps), go to another site for more details (including nearest caches,
in geocaching.com), download a GPX waypoint with it, or even send it
directly to the GPS (with Garmin Communicator).
As an example, at http://geohash.org/c216ne we can find Mount Hood, in
Oregon, and from there geocaches around it, Google Maps, etc.
I've tried to make the input box quite flexible, accepting pretty much any
reasonable format of latitude/longitude. If it doesn't work with your preferred
format, please let me know.
Nearby places will present similar geohash prefixes, and characters may be
stripped from the end of the hash to get a shorter string (and gradually
less precise).
Enjoy!
#2
Posted 26 February 2008 - 08:26 AM
Curiosity asks how are you converting a single number into coordinates?
Thanks!
#3
Posted 26 February 2008 - 09:05 AM
I'll write a detailed article, when I get some time, to explain details of the algorithm used.
I want to make sure that it stays within public domain, rather than being patented like
other algorithms have been.
This post has been edited by niemeyer: 26 February 2008 - 03:06 PM
#4
Posted 26 February 2008 - 03:50 PM
http://en.wikipedia.org/wiki/Geohash
Hopefully this establishes prior art and allows people to use it for whatever they want.
#5
Posted 26 February 2008 - 03:58 PM
Way cool.
This post has been edited by ReadyOrNot: 26 February 2008 - 04:01 PM
#6
Posted 26 February 2008 - 06:19 PM
It'd be awesome to see some client libraries available. Let me know if you need any help with that.
#7
Posted 26 February 2008 - 07:19 PM
niemeyer, on Feb 26 2008, 06:19 PM, said:
It'd be awesome to see some client libraries available. Let me know if you need any help with that.
The neat thing about subscribing to a SOAP service is I can use the functions directly in my code. The other neat thing is that its compatible with any programming language.
Dim coords as String = myService.GetCoords("c216ne")
or
Dim text as String = myService.GetText(coords)
Once you release the source code, I can write the SOAP service for you. Sounds like more fun than what I'm working on at work right now
#8
Posted 27 February 2008 - 05:30 AM
from urllib import urlopen
def get_coords(geohash):
return urlopen("http://geohash.org/%s/text" % geohash).readline()
def get_geohash(coords):
return urlopen("http://geohash.org/?format=url&q=%s" % coords).readline()
#9
Posted 27 February 2008 - 01:02 PM
#10
Posted 27 February 2008 - 03:06 PM
#11
Posted 27 February 2008 - 04:48 PM
Problem solved, so if anyone would like a PHP implementation of the algorithm, you can get one here: http://blog.dixo.net...hash-php-class/
#12
Posted 27 February 2008 - 06:11 PM
I entered the coords to my newest cache, and it gave me a map and a few choices for the style of coords - but I don't see the point.
What am I missing?
#13
Posted 27 February 2008 - 07:09 PM
FWIW, I've built a service primarily for my own use. I'll be happy if it helps other people somehow, but the primary goal has already been met.
#14
Posted 28 February 2008 - 02:43 PM
http://www.nearby.or...onvert-help.php
example
http://www.nearby.org.uk/api/convert.php?k...t=geohash-wgs84
but can cope with coordinates other that lat/long
http://www.nearby.org.uk/api/convert.php?k...t=geohash-wgs84
and the otherway
http://www.nearby.org.uk/api/convert.php?k...n=geohash-wgs84
http://www.nearby.org.uk/api/convert.php?k...n=geohash-wgs84
(specify the coordinate to avoid confusion with postcodes)
(there is soap wrapper too)
#15
Posted 01 March 2008 - 08:21 AM
I've made some improvements to geohash.org as well, adding support for geocoding of
addresses (streets, city names, whatever), implemented a bookmark and a mapplet to help
using it from Google Maps (check Tips & Tricks), and also documented the supported
query parameters, in case someone would like to build custom tools (in the same document).

Help








