GeoClue: The Geolocation Service
Geoclue is a D-Bus service that provides location information. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
Geoclue is Free Software, licensed under GNU GPLv2+. It is developed for Linux.
The aim of project is to utilize all possible sources of geolocation to best find user's location:
- WiFi-based geolocation (accuracy: in meters)
- GPS(A) receivers (accuracy: in centimeters)
- GPS of other devices on the local network, e.g smartphones (accuracy: in centimeters)
- 3G modems (accuracy: in kilometers, unless modem has GPS)
- GeoIP (accuracy: city-level)
For making use of your phone's (currently only Android supported) GPS, you'll need to install the latest version of GeoclueShare app on your phone.
Geoclue used to also do (reverse-)geocoding but that functionality has been dropped in favour of geocode-glib library.
Discuss & contribute
How to use it from an application
Here you can find documentation for the D-Bus API: http://www.freedesktop.org/software/geoclue/docs/
libgeoclue API documentation is here: https://www.freedesktop.org/software/geoclue/docs/libgeoclue/
Here is an example of how a C application can locate its user: http://cgit.freedesktop.org/geoclue/plain/demo/where-am-i.c
Get the source
The code is is available as a tar-ball and in a Git repository.
For latest release tarballs, use the 'Download' option of gitlab on the tag of your choice.
Older (than 2.4.13) releases are available here here.
Git repository: https://gitlab.freedesktop.org/geoclue/geoclue
Geoclue got started during GNOME Summit 2006 in Boston. At least Keith Preston and Tuomas Kuosmanen can be blamed.
There was a total rewrite after version 0.9. Use tag "0.9" (as in git checkout 0.9) if you need the old code.
There was yet another rewrite that we call geoclue2. The first version to introduce the re-write was 1.99. You can find the rationale for the re-write here but I was way too lazy/busy to preserve the previous wiki page.