Skip to main content

Python bindings to MEOS

Project description

Tests Status Codacy Badge MIT License

MEOS Logo

MEOS (Mobility Engine, Open Source) is a C++ library which makes it easy to work with temporal and spatio-temporal data. It is based on MobilityDB's data types and functions. MEOS's code is heavily inspired from a similar library called GEOS - hence the name. This repository also includes PyMEOS - python bindings to MEOS using pybind11.

⚠️ Currently this library is an early, experimental stage - breaking changes might occur as it evolves.

Design goals and tenets

  • Extensibility
  • Ease of use and getting started
  • Interoperability
  • Functionality over performance (for now)

Projects built using MEOS

MEOS aims to the base on which more libraries can be built. Right now work is underway for the following to be rewritten on top of MEOS/PyMEOS:

Usage

Python

Installation

pip install pymeos

Note: libgeos-dev might need to be installed on your system.

Code sample

import datetime
from pymeos import Geometry
from pymeos.temporal import TInstantGeom, TSequenceGeom


def datetime_utc(year, month, day, hour=0, minute=0, second=0):
    return datetime.datetime(year, month, day, hour, minute, second, tzinfo=datetime.timezone.utc)


# Example creation of trajectory (temporal sequence of geometries)
trajectory = TSequenceGeom({
    TInstantGeom(Geometry(0, 0), datetime_utc(2012, 1, 1, 8, 0)),
    TInstantGeom(Geometry(2, 0), datetime_utc(2012, 1, 1, 8, 10)),
    TInstantGeom(Geometry(2, 1), datetime_utc(2012, 1, 1, 8, 15)),
})

print(trajectory)
[POINT (0 0)@2012-01-01T08:00:00+0000, POINT (2 0)@2012-01-01T08:10:00+0000, POINT (2 1)@2012-01-01T08:15:00+0000)

Some more operations over this data:

# Work with individual
>>> trajectory.instants
{POINT (2 0)@2012-01-01T08:10:00+0000, POINT (2 1)@2012-01-01T08:15:00+0000, POINT (0 0)@2012-01-01T08:00:00+0000}

>>> trajectory.startValue
POINT (0 0)

>>> trajectory.endValue
POINT (2 1)

# Extract just the temporal aspect
>>> trajectory.timestamps
{datetime.datetime(2012, 1, 1, 8, 15, tzinfo=datetime.timezone.utc), datetime.datetime(2012, 1, 1, 8, 10, tzinfo=datetime.timezone.utc), datetime.datetime(2012, 1, 1, 8, 0, tzinfo=datetime.timezone.utc)}

Documentation

Docs and API Reference: https://pymeos.netlify.app

More detailed usage guide/quickstart: https://pymeos.netlify.app/quickstart.html

C++

#include <iostream>
#include <meos/types/temporal/TSequence.hpp>
#include "time_utils.cpp"
using namespace std;


int main() {
    set<TInstant<int>> instants = {
        TInstant<int>(2, unix_time_point(2012, 1, 1)),
        TInstant<int>(1, unix_time_point(2012, 1, 2)),
        TInstant<int>(4, unix_time_point(2012, 1, 3)),
        TInstant<int>(3, unix_time_point(2012, 1, 4)),
    };
    TSequence<int> tseq(instants);
    cout << tseq << endl;
    return 0;
}
[POINT (0 0)@2012-01-01T08:00:00+0000, POINT (2 0)@2012-01-01T08:10:00+0000, POINT (2 1)@2012-01-01T08:15:00+0000)

Example

Minimalistic C++ app example: https://github.com/adonmo/meos-cpp-example

Documentation

C++ API Reference: https://meos.netlify.app

Contributing

Issues and pull requests are welcome.

  • For proposing new features/improvements or reporting bugs, create an issue.
  • Check open issues for viewing existing ideas, verify if it is already proposed/being worked upon.
  • Instruction on how to build, test and generate documentation can be found in DEVELOPMENT.md
  • When implementing new features make sure to add relevant tests and documentation before sending pull requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymeos-0.0.9.tar.gz (42.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymeos-0.0.9-pp36-pypy36_pp73-manylinux2010_x86_64.whl (1.6 MB view details)

Uploaded PyPymanylinux: glibc 2.12+ x86-64

pymeos-0.0.9-pp36-pypy36_pp73-macosx_10_9_x86_64.whl (655.4 kB view details)

Uploaded PyPymacOS 10.9+ x86-64

pymeos-0.0.9-cp38-cp38-win_amd64.whl (400.3 kB view details)

Uploaded CPython 3.8Windows x86-64

pymeos-0.0.9-cp38-cp38-manylinux2010_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

pymeos-0.0.9-cp38-cp38-macosx_10_9_x86_64.whl (664.3 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

pymeos-0.0.9-cp37-cp37m-win_amd64.whl (384.8 kB view details)

Uploaded CPython 3.7mWindows x86-64

pymeos-0.0.9-cp37-cp37m-manylinux2010_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

pymeos-0.0.9-cp37-cp37m-macosx_10_9_x86_64.whl (631.5 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

pymeos-0.0.9-cp36-cp36m-win_amd64.whl (384.8 kB view details)

Uploaded CPython 3.6mWindows x86-64

pymeos-0.0.9-cp36-cp36m-manylinux2010_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

pymeos-0.0.9-cp36-cp36m-macosx_10_9_x86_64.whl (631.4 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

pymeos-0.0.9-cp35-cp35m-win_amd64.whl (384.8 kB view details)

Uploaded CPython 3.5mWindows x86-64

pymeos-0.0.9-cp35-cp35m-manylinux2010_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.5mmanylinux: glibc 2.12+ x86-64

pymeos-0.0.9-cp35-cp35m-macosx_10_9_x86_64.whl (632.0 kB view details)

Uploaded CPython 3.5mmacOS 10.9+ x86-64

File details

Details for the file pymeos-0.0.9.tar.gz.

File metadata

  • Download URL: pymeos-0.0.9.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9.tar.gz
Algorithm Hash digest
SHA256 736c97e508b2baddd4c07a7d536b4c4596b944401aecfb46ba56353331099383
MD5 6ba2108333ce3a0b269599161d28c152
BLAKE2b-256 db2f6d0fe9b572905073e76a59676be0e10dee4eaeef916671c59075cc8bacb6

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-pp36-pypy36_pp73-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-pp36-pypy36_pp73-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: PyPy, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 089e0a3a41dc5b6b8d91788742af00b9014115d94ce2c802cae1d92e4e39c2e1
MD5 8b1b15638456dbdada6bbc3fffa5898a
BLAKE2b-256 db78ec9fa5d03e69ca7da565cdf0f273cb24890b5bee4b346500c454644017eb

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-pp36-pypy36_pp73-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 655.4 kB
  • Tags: PyPy, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d6968089f8f97be17da56aae84ccb529bf0d23f77768973fd7e753669507035e
MD5 ecbdffb04e3df8f91f64364895c589bd
BLAKE2b-256 b22f6e921f7ac5c35deafeca9ad9874417cf306b4c2783aa7446de2494a89051

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 400.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 06b84c8b2dbebc253cbff26a52b75d0a72f4643577069298e4950a9ed7a8fe74
MD5 f3265bf4436fb2ea2ddfcab4470dff78
BLAKE2b-256 e10cfcf01c11c9980fb6ed7a13d62ae616d9ac8e3146135096b2808386c76c4b

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3baa1d9e556d72f25f3d271360a0480a7514e4e9d49372d3df22aa1bd203035a
MD5 1e76388228ad7b602446a5458819014a
BLAKE2b-256 21ec7fafd14f4a3efc884aa49480de6835ac00567300dc9390dc65522a9e70b8

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 664.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 33dc929836f8e621fcc95088f2f45b0acd1a8ee4df426d96d2647d21c1885ecc
MD5 2cf7c4825ec5a672002a2baf6d44f8ef
BLAKE2b-256 40d3a716d43bf042bdbcfd5b63afaafbbfb55b117bbb9b9c5737687cc9684662

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 384.8 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 477e4e211617f586dfbf5dc88f277b246f9ad6b4839885d8211fa19b03998361
MD5 703095a0e430b72582a0161de15ea4c9
BLAKE2b-256 33f191746665fd5c40aa6a1c2571a28ac098025db4c64c5f99691dce708c27a2

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 70aaecc85cc2e0c17bdf22ed8a1bcb99f5dbb2ed4fd784050281dbf758472be1
MD5 0b7a8f8f1ed3fb5492d19ae8d39092a3
BLAKE2b-256 c4d76ee8d9edd7b408285ec7db0a89a57ce3c88803e1cb2808223133955c1efe

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 631.5 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6e6bd234c5503524703c3604d0fed1b864462097ecf4ddae8762b4548ab17dbf
MD5 112cf524461af3323154112ace302bfa
BLAKE2b-256 db07cbb481d178727a38f62a4925c43b2b3803de495e36bcc6a7d655cd7664b5

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 384.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 37fddb242f03180ad9f310472e8c1647d1f91d9cb5ca4164e87740962d019a06
MD5 28a48d8bf632afc32736b5f961d2bf19
BLAKE2b-256 df1db401e5c1576301c72400e5a11dd5331ab111072edf8a41c30885127c1082

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2ff5cfc28700d793c6de782c0abed6052b0c5e1e5269f231caf2b17d25c96298
MD5 954155e0b1a4c8cc8a19125bfcf5db02
BLAKE2b-256 56e4cb1cf1a3d219f29d902b8bcd77b22e8b15107e15deb460afede4b5f1cebd

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 631.4 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aff97cffea5271769b9ffb1dc098d131c35311bcd03d11af3ab2494f0fe3f27b
MD5 8ec90653be88781b74f070597e8c51ac
BLAKE2b-256 2215931c622569f278a99eaca53abec53cd24f9178cd0b66df71473a3609b766

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 384.8 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 17222b7645e8708b29f6c85d9f43858b56330eb5793861f01d54b2a0939b4298
MD5 6a6d02e4be204d182b4b8a2b5cbd70d9
BLAKE2b-256 be79ac3fa7619108e0e382564fb2d9db5704fa36094ee9c5d0df829fd090e8bc

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fc490883462a468b37f4780bd7cb4f5c963a882669597a0c61262a89ad04610e
MD5 2020971c55079c0b5bc0b96e64a2978e
BLAKE2b-256 60e9527e90a519898c86217da91b693bf2cabb59794019595f4dc495e43ec0aa

See more details on using hashes here.

File details

Details for the file pymeos-0.0.9-cp35-cp35m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pymeos-0.0.9-cp35-cp35m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 632.0 kB
  • Tags: CPython 3.5m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pymeos-0.0.9-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 22ead7136061fa779a55ed951d4b77ec4c6fe5be1d7aafdfdbf0e43f465a9526
MD5 8de749122fb996b34fe655fd2ad6fe74
BLAKE2b-256 cc3771cc5dde887cb9b1b07a64da68ba8cd99ac9fc9dbee1aae04605459e242f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page