1GEOME(1) Internet / geolocation GEOME(1)
2
3
4
6 geome - Get your location based on wifi signals and your IP address
7 using Google Location
8
10 geome [-s] [-q] [-h] [-v]
11
13 If available, geome queries NetworkManager for its wifi information,
14 such as mac addresses and signal strength, and together with its IP
15 address, sends this information to the Google GeoLocation service to
16 obtain your geographic location.
17
19 -k / --key
20 Specify a Google API key to use. An API key is required to use the
21 API that allows submitting Wifi accesspoints and celltower signal
22 strength information. If not specified, the geome library looks for
23 an api key in the user's ~/.config/geome file. If no apikey is
24 specified or found, an alternative Google API is used based on only
25 the IP address, which is far less acurate
26
27 -K / --keyshow
28 Show the Google API key used.
29
30 -q / --quiet / -s / --silent
31 Quiet or Silent mode. Only return latitude and longitude, separated
32 by a comma, on a single line. Without this option, everything that
33 Google returns is displayed, including latitude, longitude,
34 accuracy, address, country, postal code and more.
35
36 -a / --address
37 Return a human readable address.
38
39 -c / --country
40 Return the country name (eg 'Canada')
41
42 -i / --iso
43 Return the country ISO code (eg 'CA')
44
45 -C / --city
46 Return the city name (eg 'Toronto')
47
48 -n / --neighborhood
49 Return the neighborhood name (eg 'The Bronx')
50
51 -j / --json
52 Return a json string with lat,long and accuracy
53
54 -r / --rawjson
55 Return a json string with lat,long and accuracy
56
57 -h / --help
58 Output help information and exit.
59
60 -v / --version
61 Output version information and exit.
62
64 geome works best if it can talk to NetworkManager and obtain a list of
65 nearby Access Points and their strength. If this is unavailable, for
66 instance because NetworkManager is not running, or the computer has no
67 wifi cards, an empty wifi list is sent and Google will return results
68 solely based on the IP address of the request.
69
71 geome outputs the location information, if available and exits. The
72 following exit codes are used:
73
74 0
75 Success
76
77 1
78 Network connectivity issues, such as broken DNS or blocked HTTP
79 traffic
80
81 2
82 A captive portal was detected and prevented communication with the
83 Google Location service
84
85 3
86 Unexpected error or bad Google API key
87
89 The geome python module supports the following functions
90
91 geome.apikey()
92 Set or query the current Google API key. If this function is not
93 used, geome will look for the API key in a file at
94 ~/.config/geome/apikey. Without an API key, wifi and cell tower
95 signals cannot be submitted to google and the position returned
96 will not be very accurate.
97
98 geome.location()
99 Returns a json structure with the location (in lat/long) and
100 accuracy.
101
102 geome.json_latlong()
103 Returns the full raw json structure with multiple address locations
104 straight from the Google API
105
106 geome.my_address()
107 Returns a human readable full address.
108
109 geome.my_country(), geome.my_city(), geome.my_country_iso(),
110 my_neighborhood
111 Returns the respective country, city, country ISO code and
112 neighborhood name
113
115 Cell tower strength sending has not yet been implemented. When google
116 returns more then one location component, only the first location of
117 location_type APPROXIMATE is used.
118
120 This is really a stripped down version of geolocation-cli written by
121 Francis Markham and available at
122 <http://code.google.com/p/geolocate-cli/>.
123
124 Mangled by Paul Wouters <pwouters@redhat.com>
125
127 This program is free software; you can redistribute it and/or modify it
128 under the terms of the GNU General Public License as published by the
129 Free Software Foundation; either version 3 of the License, or (at your
130 option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
131
132 This program is distributed in the hope that it will be useful, but
133 WITHOUT ANY WARRANTY; without even the implied warranty of
134 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
135 General Public License (file COPYING in the distribution) for more
136 details.
137
138
139
140Paul Wouters November 11, 2012 GEOME(1)