SlideShare a Scribd company logo
1
GeoClue
- The Geolocation Service
William.L
wiliwe@gmail.com
2010-06-15
2
Outline
History
Overview
Dependencies
Components
Reference
3
History & Goal
Started during GNOME Summit 2006 in Boston.
Provides a convenient way to find out where the user is,
from a number of sources such as GPS, GSM cell, wifi
network, internetwork.
4
Overview
GeoClue
A software framework utilizing the D-Bus inter-process
communication(IPC) mechanism to provide location
information, and applications can use it to become geo-aware
Can geocode(getting a Position(longitude/latitude
coordinate) from an Address) and
reverse-geocode (getting an Address from a Position)
Licensed under the GNU LGPL
http://geoclue.freedesktop.org/
5
Dependencies (1/2)
GObject
Glib
D-Bus
GPSD
A GPS daemon on most Debian like system
http://gpsd.berlios.de/
Gypsy
Written by Iain Holmes at o-hand
A GPS multiplexing daemon which allows multiple clients
to access GPS data from multiple GPS sources
concurrently
http://gypsy.freedesktop.org/wiki/
6
Dependencies (2/2)
Wammu
A program to manage data in your cell phone such as
contacts, calendar or messages.
http://wammu.eu/
OpenCellID (basement station ID)
Aiming to create a complete database of CellID
worlwide, with their locations.
http://opencellid.org/
7
Components (1/10)
A set of geoinformation interfaces
For querying "current situation“
Position
Address
Velocity
Use a method / signal architecture
Ex : To get current position, use –
geoclue_position_get_position() method or "position-
changed" signal with a callback function
8
Components (2/10)
Class of Interfaces
Position - GeocluePosition
Via gpsd, gypsy, hostip, plazes, gsmloc
Address - GeoclueAddress
Via hostip, plazes, manual, localnet
Velocity - GeoclueVelocity
Via gpsd, gypsy
Geocode - GeoclueGeocode
Via nominatim (http://nominatim.openstreetmap.org/),
geonames (http://www.geonames.org/),
yahoo (http://developer.yahoo.com/maps/rest/V1/geocode.html)
ReverseGeocode - GeoclueReverseGeocode
Via nominatim, geonames
Accuracy - GeoclueAccuracy
Reports the horizontal and vertical accuracy levels
9
Components (3/10)
Provider
Implement more than one Geoclue interface
All Geoclue providers are D-Bus services
Do not have to run as daemons, as D-Bus will start them
when needed (providers may also shut down when they're no
longer used).
Currently has 9 providers -
http://www.freedesktop.org/wiki/Software/GeoClue/Providers
10
Components (4/10)
Type of Providers
User-specified address that maps to a
router's mac address (home, office).
A user-specified address
A web service that gets location based on
your current router mac address.
Interfaces with a user's Plazes account.
http://plazes.com
A web service that guesses location based
on the current IP address.
http://www.hostip.info
Description
Address
Address
Position, Address
Position, Address
Service
Localnet
Manual
Plazes
Hostip
Type
11
Components (5/10)
Type of Providers
Gets cell ID data, and estimates location
from a web service based upon that data
PositionGsmloc
A GPS daemon that supports bluetooth
and serial GPS devices
Position, VelocityGypsy
A web service that can convert an address
to a position. Conversely, it can also find
the nearest address to a given position.
A web service that converts an address to
a position
A GPS daemon that uses TCP sockets
Description
Geocode,
ReverseGeocode
Geocode
Position, Velocity
Service
Geonames
Yahoo
GPSd
Type
12
Components (6/10)
Problem on using Providers
A single provider cannot be the best solution to all problems
The "best" providers will be different depending on the user
Master Provider
Single window for user to use providers
It is an attempt to take away all of the complications of choosing
the right provider
Choose the best provider to provide what you are looking
for based on client requirements and provider availability,
accuracy and resource requirements.
The provider that is actually used may change over time
as conditions change, but the client can just ignore this
13
Components (7/10)
Usage of Master Provider
A typical Master provider use :
Getting a client-specific GeoclueMasterClient from GeoclueMaster
Setting GeoclueMasterClient requirements (such as accuracy)
Starting the wanted interfaces (such as Position)
Using the client just like a regular provider
Master provider is fairly new and may not be as stable
as the rest of Geoclue
14
Components (8/10)
Ex : Master Provider
#include <geoclue/geoclue-master.h>
static void position_changed(...) {
if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) {
g_print ("t%f, %fnn", latitude, longitude);}
else { g_print ("tLatitude and longitude not available.nn"); } }
int main ()
{
GMainLoop *loop;
GeoclueMaster *master;
GeoclueMasterClient *client;
GeocluePosition *pos;
GeocluePositionFields fields;
double lat, lon;
GError *error = NULL;
g_type_init ();
/ * create a MasterClient using Master * /
master = geoclue_master_get_default ();
client = geoclue_master_create_client (master, NULL, &error);
g_object_unref (master);
if (!client)
{
g_printerr ("Error creating GeoclueMasterClient");
g_error_free (error);
return 1;
}
15
Components (9/10)
/ * Set our requirements: We want at least city level accuracy, require signals,
and allow the use of network (but not e.g. GPS) * /
if (!geoclue_master_client_set_requirements (client, GEOCLUE_ACCURACY_LEVEL_LOCALITY,
0, TRUE, GEOCLUE_RESOURCE_NETWORK, &error))
{
g_printerr ("set_requirements failed: %s", error->message);
g_error_free (error);
g_object_unref (client);
return 1;
}
/ * Get a Position object * /
pos = geoclue_master_client_create_position (client, NULL);
if (!pos) {
g_printerr ("Failed to get a position object");
g_object_unref (client);
return 1;
}
/ * call get_position. We do not know which provider actually provides the answer (although we could find out using MasterClient API) * /
fields = geoclue_position_get_position (pos, NULL, &lat, &lon, NULL, NULL, &error);
if (error) {
g_printerr ("Error in geoclue_position_get_position: %s.n", error->message);
g_error_free (error);
error = NULL;
} else {
if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE &&
fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) {
g_print ("We're at %.3f, %.3f.n", lat, lon); }
}
g_signal_connect (G_OBJECT (pos), "position-changed", G_CALLBACK (position_changed), NULL);
16
Components (10/10)
loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);
g_main_loop_unref (loop);
g_object_unref (pos);
g_object_unref (client);
return 0;
}
17
References
GeoClue API
http://folks.o-hand.com/jku/geoclue-docs
Geoclue: Location Information Retrieval for Moblin
2.0 Linux
http://software.intel.com/en-us/articles/geoclue-location-
information- retrieval-for-moblin-20-linux/
http://software.intel.com/zh-cn/blogs/2009/03/11/moblin-sdk-
geoclue/

More Related Content

Viewers also liked

Android Services and Managers Basic
Android Services and Managers BasicAndroid Services and Managers Basic
Android Services and Managers Basic
William Lee
 
Android Debugging (Chinese)
Android Debugging (Chinese)Android Debugging (Chinese)
Android Debugging (Chinese)
William Lee
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
William Lee
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
William Lee
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
William Lee
 
Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069William Lee
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)William Lee
 
Qt Development Tools
Qt Development ToolsQt Development Tools
Qt Development ToolsWilliam Lee
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
William Lee
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
William Lee
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
William Lee
 
Android Storage - Internal and External Storages
Android Storage - Internal and External StoragesAndroid Storage - Internal and External Storages
Android Storage - Internal and External Storages
William Lee
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)
William Lee
 
MTP & PTP
MTP & PTPMTP & PTP
MTP & PTP
William Lee
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
William Lee
 
Android Storage - Vold
Android Storage - VoldAndroid Storage - Vold
Android Storage - Vold
William Lee
 

Viewers also liked (17)

Android Services and Managers Basic
Android Services and Managers BasicAndroid Services and Managers Basic
Android Services and Managers Basic
 
Android Debugging (Chinese)
Android Debugging (Chinese)Android Debugging (Chinese)
Android Debugging (Chinese)
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)
 
Qt Development Tools
Qt Development ToolsQt Development Tools
Qt Development Tools
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
 
IPv6 Overview
IPv6 OverviewIPv6 Overview
IPv6 Overview
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
 
Android Storage - Internal and External Storages
Android Storage - Internal and External StoragesAndroid Storage - Internal and External Storages
Android Storage - Internal and External Storages
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)
 
MTP & PTP
MTP & PTPMTP & PTP
MTP & PTP
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
Android Storage - Vold
Android Storage - VoldAndroid Storage - Vold
Android Storage - Vold
 

Similar to GNOME GeoClue - The Geolocation Service in Gnome

Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication development
Ganesh Gembali
 
Scripting GeoServer
Scripting GeoServerScripting GeoServer
Scripting GeoServer
Jared Erickson
 
maXbox Starter 39 GEO Maps Tutorial
maXbox Starter 39 GEO Maps TutorialmaXbox Starter 39 GEO Maps Tutorial
maXbox Starter 39 GEO Maps Tutorial
Max Kleiner
 
GEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIAL
GEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIALGEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIAL
GEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIAL
Sohail Akbar Goheer
 
Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...
Boris Kravtsov
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
marpierc
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
Jody Garnett
 
EDINA's Open Geo-Services
EDINA's Open Geo-ServicesEDINA's Open Geo-Services
EDINA's Open Geo-Services
Addy Pope
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
Geolocation in Drupal
Geolocation in DrupalGeolocation in Drupal
Geolocation in Drupal
Mediacurrent
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
Microsoft Mobile Developer
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedPeter Lubbers
 
LocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGigLocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGig
Frank Gasdorf
 
DIY Uber
DIY UberDIY Uber
DIY Uber
NSCoder Mexico
 
Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...
Ari Jolma
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
Sergi Almar i Graupera
 
How to configure the cluster based on Multi-site (WAN) configuration
How to configure the clusterbased on Multi-site (WAN) configurationHow to configure the clusterbased on Multi-site (WAN) configuration
How to configure the cluster based on Multi-site (WAN) configuration
Akihiro Kitada
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008
xilinus
 

Similar to GNOME GeoClue - The Geolocation Service in Gnome (20)

Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication development
 
Scripting GeoServer
Scripting GeoServerScripting GeoServer
Scripting GeoServer
 
maXbox Starter 39 GEO Maps Tutorial
maXbox Starter 39 GEO Maps TutorialmaXbox Starter 39 GEO Maps Tutorial
maXbox Starter 39 GEO Maps Tutorial
 
GEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIAL
GEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIALGEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIAL
GEOSERVER - DOWNLOAD AND INSTALLATION STEP BY STEP TUTORIAL
 
Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
 
PPT
PPTPPT
PPT
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
EDINA's Open Geo-Services
EDINA's Open Geo-ServicesEDINA's Open Geo-Services
EDINA's Open Geo-Services
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
Geolocation in Drupal
Geolocation in DrupalGeolocation in Drupal
Geolocation in Drupal
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashed
 
LocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGigLocationTech Meetup Hamburg 2014 - GeoGig
LocationTech Meetup Hamburg 2014 - GeoGig
 
DIY Uber
DIY UberDIY Uber
DIY Uber
 
A Case for Grails
A Case for GrailsA Case for Grails
A Case for Grails
 
Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
 
How to configure the cluster based on Multi-site (WAN) configuration
How to configure the clusterbased on Multi-site (WAN) configurationHow to configure the clusterbased on Multi-site (WAN) configuration
How to configure the cluster based on Multi-site (WAN) configuration
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008
 

More from William Lee

Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
William Lee
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
William Lee
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3
William Lee
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
William Lee
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
William Lee
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
William Lee
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
William Lee
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
William Lee
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
William Lee
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
William Lee
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
William Lee
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
William Lee
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
William Lee
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
William Lee
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
William Lee
 
Study of Chromium OS
Study of Chromium OSStudy of Chromium OS
Study of Chromium OSWilliam Lee
 
More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)William Lee
 
Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069William Lee
 

More from William Lee (19)

Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
 
Study of Chromium OS
Study of Chromium OSStudy of Chromium OS
Study of Chromium OS
 
More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)
 
Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069
 
Qt Animation
Qt AnimationQt Animation
Qt Animation
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

GNOME GeoClue - The Geolocation Service in Gnome

  • 1. 1 GeoClue - The Geolocation Service William.L wiliwe@gmail.com 2010-06-15
  • 3. 3 History & Goal Started during GNOME Summit 2006 in Boston. Provides a convenient way to find out where the user is, from a number of sources such as GPS, GSM cell, wifi network, internetwork.
  • 4. 4 Overview GeoClue A software framework utilizing the D-Bus inter-process communication(IPC) mechanism to provide location information, and applications can use it to become geo-aware Can geocode(getting a Position(longitude/latitude coordinate) from an Address) and reverse-geocode (getting an Address from a Position) Licensed under the GNU LGPL http://geoclue.freedesktop.org/
  • 5. 5 Dependencies (1/2) GObject Glib D-Bus GPSD A GPS daemon on most Debian like system http://gpsd.berlios.de/ Gypsy Written by Iain Holmes at o-hand A GPS multiplexing daemon which allows multiple clients to access GPS data from multiple GPS sources concurrently http://gypsy.freedesktop.org/wiki/
  • 6. 6 Dependencies (2/2) Wammu A program to manage data in your cell phone such as contacts, calendar or messages. http://wammu.eu/ OpenCellID (basement station ID) Aiming to create a complete database of CellID worlwide, with their locations. http://opencellid.org/
  • 7. 7 Components (1/10) A set of geoinformation interfaces For querying "current situation“ Position Address Velocity Use a method / signal architecture Ex : To get current position, use – geoclue_position_get_position() method or "position- changed" signal with a callback function
  • 8. 8 Components (2/10) Class of Interfaces Position - GeocluePosition Via gpsd, gypsy, hostip, plazes, gsmloc Address - GeoclueAddress Via hostip, plazes, manual, localnet Velocity - GeoclueVelocity Via gpsd, gypsy Geocode - GeoclueGeocode Via nominatim (http://nominatim.openstreetmap.org/), geonames (http://www.geonames.org/), yahoo (http://developer.yahoo.com/maps/rest/V1/geocode.html) ReverseGeocode - GeoclueReverseGeocode Via nominatim, geonames Accuracy - GeoclueAccuracy Reports the horizontal and vertical accuracy levels
  • 9. 9 Components (3/10) Provider Implement more than one Geoclue interface All Geoclue providers are D-Bus services Do not have to run as daemons, as D-Bus will start them when needed (providers may also shut down when they're no longer used). Currently has 9 providers - http://www.freedesktop.org/wiki/Software/GeoClue/Providers
  • 10. 10 Components (4/10) Type of Providers User-specified address that maps to a router's mac address (home, office). A user-specified address A web service that gets location based on your current router mac address. Interfaces with a user's Plazes account. http://plazes.com A web service that guesses location based on the current IP address. http://www.hostip.info Description Address Address Position, Address Position, Address Service Localnet Manual Plazes Hostip Type
  • 11. 11 Components (5/10) Type of Providers Gets cell ID data, and estimates location from a web service based upon that data PositionGsmloc A GPS daemon that supports bluetooth and serial GPS devices Position, VelocityGypsy A web service that can convert an address to a position. Conversely, it can also find the nearest address to a given position. A web service that converts an address to a position A GPS daemon that uses TCP sockets Description Geocode, ReverseGeocode Geocode Position, Velocity Service Geonames Yahoo GPSd Type
  • 12. 12 Components (6/10) Problem on using Providers A single provider cannot be the best solution to all problems The "best" providers will be different depending on the user Master Provider Single window for user to use providers It is an attempt to take away all of the complications of choosing the right provider Choose the best provider to provide what you are looking for based on client requirements and provider availability, accuracy and resource requirements. The provider that is actually used may change over time as conditions change, but the client can just ignore this
  • 13. 13 Components (7/10) Usage of Master Provider A typical Master provider use : Getting a client-specific GeoclueMasterClient from GeoclueMaster Setting GeoclueMasterClient requirements (such as accuracy) Starting the wanted interfaces (such as Position) Using the client just like a regular provider Master provider is fairly new and may not be as stable as the rest of Geoclue
  • 14. 14 Components (8/10) Ex : Master Provider #include <geoclue/geoclue-master.h> static void position_changed(...) { if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) { g_print ("t%f, %fnn", latitude, longitude);} else { g_print ("tLatitude and longitude not available.nn"); } } int main () { GMainLoop *loop; GeoclueMaster *master; GeoclueMasterClient *client; GeocluePosition *pos; GeocluePositionFields fields; double lat, lon; GError *error = NULL; g_type_init (); / * create a MasterClient using Master * / master = geoclue_master_get_default (); client = geoclue_master_create_client (master, NULL, &error); g_object_unref (master); if (!client) { g_printerr ("Error creating GeoclueMasterClient"); g_error_free (error); return 1; }
  • 15. 15 Components (9/10) / * Set our requirements: We want at least city level accuracy, require signals, and allow the use of network (but not e.g. GPS) * / if (!geoclue_master_client_set_requirements (client, GEOCLUE_ACCURACY_LEVEL_LOCALITY, 0, TRUE, GEOCLUE_RESOURCE_NETWORK, &error)) { g_printerr ("set_requirements failed: %s", error->message); g_error_free (error); g_object_unref (client); return 1; } / * Get a Position object * / pos = geoclue_master_client_create_position (client, NULL); if (!pos) { g_printerr ("Failed to get a position object"); g_object_unref (client); return 1; } / * call get_position. We do not know which provider actually provides the answer (although we could find out using MasterClient API) * / fields = geoclue_position_get_position (pos, NULL, &lat, &lon, NULL, NULL, &error); if (error) { g_printerr ("Error in geoclue_position_get_position: %s.n", error->message); g_error_free (error); error = NULL; } else { if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) { g_print ("We're at %.3f, %.3f.n", lat, lon); } } g_signal_connect (G_OBJECT (pos), "position-changed", G_CALLBACK (position_changed), NULL);
  • 16. 16 Components (10/10) loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (loop); g_main_loop_unref (loop); g_object_unref (pos); g_object_unref (client); return 0; }
  • 17. 17 References GeoClue API http://folks.o-hand.com/jku/geoclue-docs Geoclue: Location Information Retrieval for Moblin 2.0 Linux http://software.intel.com/en-us/articles/geoclue-location- information- retrieval-for-moblin-20-linux/ http://software.intel.com/zh-cn/blogs/2009/03/11/moblin-sdk- geoclue/