Skip to content

tigrangh/geo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geo

Geo is a small http server intended to serve geolocation API requests originating from Traccar server.

Since the big geolocation APIs either cost money or rate limit the requests, Geo is here to handle the requests from Traccar and to cache gsm tower information received from Google Cloud or Unwired Labs APIs. Later, when the cache is sufficient the requests are handled locally by Geo only.

Geo configuration file, geo.ini, in addition to couple more settings, can specify the following

Then we can configure traccar.xml like this

...
<properties>
    ...
    <entry key='geolocation.enable'>true</entry>
    <entry key='geolocation.type'>unwired</entry>
    <entry key='geolocation.key'>UNWIRED_KEY</entry>
    <entry key='geolocation.url'>http://127.0.0.1:8118</entry>
    <entry key='geolocation.processInvalidPositions'>true</entry>
</properties>

With this, Traccar will send a request to Geo, which in turn will process the towers one by one and send a request to unwiredlabs.com or in case of failure fall back to googleapis.com, according to geo.ini configuration. Geo will try to be smart and cache each tower information, and if something unexpected happens, it will fall back to dumb proxy mode, simply to route the Traccar's raw request to unwiredlabs.com. This is why UNWIRED_KEY appears both in traccar.xml and in geo.ini.

The cache is collected in geo.db SQLite DB.
Geo also mimicks triangulation to some extent.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages