jonthekiller / LocationHistoryIngress

Script to convert Location History file from Google for IITC
1 stars 0 forks source link

See your Location History in IITC

Script to convert Location History file from Google for IITC. The objective is to be able to optimize your Ingress Explorer statistics.

Example

http://i.imgur.com/qFydgWf.png

Prerequisites

Setup

Full Conversion

Or

hhvm convertfull.php <XML LocationHistory file>
cp -f "finished/<XML LocationHistory file name>" "templates/<XML LocationHistory file name>"

For 700 000 points, it tooks 4 hours with HHVM. (Simple benchmarking with Paris for major zone of datas).

The full conversion use a mechanism to split into 2 zones the complete world for performance (typical zone where you have a lot of points and often the same, and the rest of the world).

Update Conversion

The update mode will take the information from the full conversion to know which datas are new and add to the template file (template is the full file after conversion). Update will fail if a full was not done before.

Import into PostGIS database

Run

ogr2ogr -f "PostgreSQL" PG:"dbname=<PostGIS Database> user=<PostGIS User> password=<PostGIS User password>" "finished/<XML LocationHistory file name>"

Publish PostGIS database into GeoServer

http://docs.geoserver.org/latest/en/user/gettingstarted/postgis-quickstart/index.html

IITC Plugin

Import the file iitc-plugin-overlay-mapshistory.js into IITC and change the 2 followings parameters:

You will find a new layer called "Maps History" into IITC layers

Limitations