This is one of those "surely there is some generic utility that is better than the quick and dirty thing I have whipped up" questions. As in, I know how to do this in several ad-hoc ways, but would love to use a standard.
BRIEF: I am looking for reasonably standard and ubiquitous tools to determine my present geographical location. Callable from Linux/UNIX command line, Perl, Emacs, etc.
DETAIL:
A trivial situation inspires this question (but there are undoubtedly more important applications): I use emacs org-mode, often to record a log or diary. I don't actually use the official org-mode diary much - mainly, I drop timestamps in an ordinary org-mode log, hidden in metadata that looks like a link.
[[metadata: timestamp="<2014-01-04 15:02:35 EST, Saturday, January 4, WW01>" <location location="??" timestamp="??"/>][03:02 PM]]
As you can see, I long ago added the ability to RECORD my location. But hitherto I have had to set it manually. I am lazy, and often neglect to set the location manually. (Minor note: I recorded the last time I manually set the location, helpful when I move and neglect to manually change my location.
I would much prefer to have code that automatically infers my location. Particularly since I have been travelling quite a bit in the last month, but probably more useful for the half-dozen or so locations I move between on a daily basis: home, work, oceanside, the standard restaurants I eat working lunch or breakfast in.
I can figure my location out using any of several tools, such as
Where Am I - See your Current Location on Google Maps - ctrlq.org/maps/where/
http://www.wolframalpha.com/input/?i=Where+am+I%3F
Perl CPAN packages such as IP::Location - to map an IP address to a location
and heuristics such as looking at WiFi SSIDs, etc.
I have already coded something up.
But... there's more depth to this than I have coded.
None of the techniques above is perfect - e.g. I may not have net.connectivity, etc. Some are OS specific.
If there is already some open source facility, I should use that.
Therefore my question: is there any reasonably ubiquitous geo location service?
My wishlist
Works cross OS
Command line utility
Can connect to widely available standard geolocation services
Works even when cannot connect to standard geolocation services, or the Internet
Customizable
Learned
Learning
Heuristics
Caching
GeoClue seems to satisfy at least some of your requirements.
To convert coordinates to human-readable address, one can use OSM Nominatim API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With