Metadata-Version: 2.4
Name: gps-data-codec
Version: 1.8.2
Keywords: gps,data,encode,decode
Home-Page: https://github.com/routechoices/gps-data-codec
Author: Raphael Stefanini <raphael@routechoices.com>
Author-email: Raphael Stefanini <raphael@routechoices.com>
License: MIT
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/routechoices/gps-data-codec
Project-URL: Source Code, https://github.com/routechoices/gps-data-codec.git

# gps-data-codec

Python library, implemented in Rust, that include base functions for encoding and decoding series of gps data (timestamp, latitude, longitude) using a algorithm similar to the one seen on encoded polylines.

## Install
 
```
pip install gps-data-codec
```

# Usage
```
>> from gps_data_codec import decode, encode
>> encode([(1628667993, 4.56543, -110.536214)]) # [(unix epoch in seconds, latitude, longitude), ...]
'qtaxyT}tzZhbtaT'
>> decode('qtaxyT}tzZhbtaT')
[(1628667993, 4.56543, -110.53621)]
```

## Warning:
  - timestamps are rounded to the closest integer value.
  - latitudes and longitudes values are rounded to the 5th decimal precision when encoding.
  - The series of timestamped locations must be sorted by timestamps in increasing order before encoding.

