0% found this document useful (0 votes)
13 views45 pages

Python Mobilitydb

Uploaded by

mikbatum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views45 pages

Python Mobilitydb

Uploaded by

mikbatum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

python-mobilitydb Documentation

Release 0.01

Esteban Zimányi

Dec 21, 2022


CONTENTS:

1 Installation 3
1.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Python Package Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Basic usage 5
2.1 TBool, TInt, and TText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 TFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 TGeomPoint and TGeogPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 API Reference 9
3.1 Time Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Temporal Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Box Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Main Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Python Module Index 35

Index 37

i
ii
python-mobilitydb Documentation, Release 0.01

python-mobilitydb is a database adapter to access MobilityDB from Python. It supports both the psycopg2 and
the asyncpg adapters for PostgreSQL and uses the postgis adapter for PostGIS.

CONTENTS: 1
python-mobilitydb Documentation, Release 0.01

2 CONTENTS:
CHAPTER

ONE

INSTALLATION

1.1 Requirements

python-mobilitydb has several dependencies beyond an installation of Python 3.x:


• psycopg2 or asyncpg to connect to PostgreSQL,
• postgis to connect to PostGIS,
• Spans for an implementation of PostgreSQL’s range types,
• python-dateutil for extensions to the standard datetime module,
• parsec for parsing.

1.2 Python Package Index

python-mobilitydb may be installed from PyPI.

$ pip install python-mobilitydb

1.3 Source

The package sources are available at https://github.com/MobilityDB/MobilityDB-python. Building and installing


python-mobilitydb from source can be done with setuptools:

$ python setup.py install

1.3.1 Tests

Tests require pytest and pytest-asyncio.

$ pytest

The PostgreSQL database server must be started before launching the tests.

3
python-mobilitydb Documentation, Release 0.01

1.3.2 Documentation

Building the documentation from source requires Sphinx. By default, the documentation will be rendered in HTML:

$ python setup.py build_sphinx

For other documentation output formats, see the options in the docs subdirectory:

$ cd docs
$ make

4 Chapter 1. Installation
CHAPTER

TWO

BASIC USAGE

python-mobilitydb is a Python converter to and from the temporal types provided by MobilityDB, that is
tbool, tint, tfloat, ttext, tgeompoint, and tgeogpoint.

2.1 TBool, TInt, and TText

Classes TBool, TInt, and TText represent, respectively, temporal Booleans, temporal integers, and temporal
strings. These classes have in common that their base type is discrete. As a consequence of this, the interpolation
for the instances of sequence or sequence set subtype is stepwise. We illustrate next how to create new instances of
the TInt class, the creation of instances of the TBool and TText classes is similar.
New TInt instances can be created by using one of its subclasses TIntInst, TIntInstSet, TIntSeq, or
TIntSeqSet.
New TIntInst instances can be created either with a single string argument as in MobilityDB or with two arguments:
the value and the timestamp.

>>> from dateutil.parser import parse


>>> from mobilitydb import TIntInst
>>> TIntInst("1@2020-01-01 00:00:00+01")
>>> TIntInst("1", "2020-01-01 00:00:00+01")
>>> TIntInst(1, parse("2020-01-01 00:00:00+01"))

New TIntInstSet instances can be created either with a single string argument as in MobilityDB or with a tuple
or list of the composing instants.

>>> from mobilitydb import TIntInstSet


>>> TIntInstSet("{1@2020-01-01, 2@2020-01-02}")
>>> TIntInstSet(["1@2020-01-01", "2@2020-01-02"])
>>> TIntInstSet("1@2020-01-01", "2@2020-01-02")
>>> TIntInstSet(TIntInst(1, "2020-01-01"), TIntInst(2, "2020-01-02"))

New TIntSeq instances can be created either with a single string argument as in MobilityDB or with several argu-
ments: the list of composing instants, the left inclusion flag, and the right inclusion flag, where only the first argument
is mandatory.

>>> from mobilitydb import TIntSeq


>>> TIntSeq("[1@2020-01-01, 2@2020-01-02]")
>>> TIntSeq(["1@2020-01-01", "2@2020-01-02"], lower_inc= True, upper_inc=True)
>>> TIntSeq([TIntInst(1, "2020-01-01"), TIntInst(2, "2020-01-02")], lower_inc= True,
˓→upper_inc=True)

5
python-mobilitydb Documentation, Release 0.01

Finally, new TIntSeqSet instances can be created either with a single string argument as in MobilityDB or with a
single argument: the list of composing sequences.

>>> from mobilitydb import TIntSeqSet


>>> TIntSeqSet("{[1@2020-01-01, 2@2020-01-02], [2@2020-01-03, 1@2020-01-04]}")
>>> TIntSeqSet(["[1@2020-01-01, 2@2020-01-02]", "[2@2020-01-03, 1@2020-01-04]"])
>>> TIntSeqSet([TIntSeq("[1@2020-01-01, 2@2020-01-02]"), TIntSeq("[2@2020-01-03,
˓→1@2020-01-04]")])

2.2 TFloat

Class TFloat represents temporal floats. Since the base type of TFloat is continuous, the interpolation for instances
of the sequence or sequence set subtype may be either linear or stepwise, the former being the default.
New TFloat instances can be created by using one of its subclasses TFloatInst, TFloatInstSet,
TFloatSeq, or TFloatSeqSet.
New TFloatInst instances can be created either with a single string argument as in MobilityDB or with two
arguments: the value and the timestamp.

>>> from dateutil.parser import parse


>>> from mobilitydb import TFloatInst
>>> TFloatInst("1.0@2020-01-01 00:00:00+01")
>>> TFloatInst("1.0", "2020-01-01 00:00:00+01")
>>> TFloatInst(1.0, parse("2020-01-01 00:00:00+01"))

New TFloatInstSet instances can be created either with a single string argument as in MobilityDB or with a tuple
or list of the composing instants.

>>> from mobilitydb import TFloatInstSet


>>> TFloatInstSet("{1.0@2020-01-01, 2.0@2020-01-02}")
>>> TFloatInstSet(["1.0@2020-01-01", "2.0@2020-01-02"])
>>> TFloatInstSet("1.0@2020-01-01", "2.0@2020-01-02")
>>> TFloatInstSet(TFloatInst("1.0@2020-01-01"), TFloatInst("2.0@2020-01-02"))

New TFloatSeq instances can be created either with a single string argument as in MobilityDB or with several
arguments: the list of composing instants, the left inclusion flag, the right inclusion flag, and the interpolation, where
only the first argument is mandatory.

>>> from mobilitydb import TFloatSeq


>>> TFloatSeq("[1.0@2020-01-01, 2.0@2020-01-02]")
>>> TFloatSeq("Interp=Stepwise;[1.0@2020-01-01, 2.0@2020-01-02]")
>>> TFloatSeq(["1.0@2020-01-01", "2.0@2020-01-02"], lower_inc= True, upper_inc=True,
˓→interp='Stepwise')

Finally, new TFloatSeqSet instances can be created either with a single string argument as in MobilityDB or with
two arguments: the list of composing sequences and the interpolation, where only the first argument is mandatory.

>>> from mobilitydb import TFloatSeqSet


>>> TFloatSeqSet("{[1.0@2020-01-01, 2.0@2020-01-02], [2.0@2020-01-03, 1.0@2020-01-04]}
˓→")

>>> TFloatSeqSet(["[1.0@2020-01-01, 2.0@2020-01-02]", "[2.0@2020-01-03, 1.0@2020-01-


˓→04]"], interp='Stepwise')

6 Chapter 2. Basic usage


python-mobilitydb Documentation, Release 0.01

2.3 TGeomPoint and TGeogPoint

Class TGeomPoint represents temporal geometric points with Cartesian (planar) coordinates while TGeogPoint
represents geographic points with geodetic (spherical) coordinates. Since the base type of these classes is continuous,
the interpolation for the instances of sequence or sequence set subtype may be either linear or stepwise, the former
being the default. We illustrate next how to create instances of the TGeomPoint class, the creation of instances of
the TGeogPoint class is similar.
New TGeomPoint instances can be created by using one of its subclasses TGeomPointInst,
TGeomPointInstSet, TGeomPointSeq, or TGeomPointSeqSet.
New TGeomPointInst instances can be created either with a single string argument as in MobilityDB or with
several arguments: the value, the timestamp, and the SRID, the latter being optional. In both cases, the value of the
point can be specified using a Well-Known Text (WKT) or Well-Known Binary (WKB) representation as well as its
format variations Extended Well-Known Text (EWKT) and Extended Well-Known Binary (EWKB).
>>> from dateutil.parser import parse
>>> from postgis import Point
>>> from mobilitydb import TGeomPointInst
>>> TGeomPointInst("POINT(1 1)@2020-01-01 00:00:00+01")
>>> TGeomPointInst("SRID=4326;POINT(1 1)@2020-01-01 00:00:00+01")
>>> TGeomPointInst("01010000000000000000004AC00000000000000000@2020-01-01")
>>> TGeomPointInst("POINT(1 1)", "2020-01-01 00:00:00+01", srid=4326)
>>> TGeomPointInst(Point(1, 1), parse("2020-01-01 00:00:00+01"), srid=4326)

New TGeomPointInstSet instances can be created either with a single string argument as in MobilityDB or with
two arguments: the list of composing instants and the SRID, the latter being optional.
>>> from mobilitydb import TGeomPointInstSet
>>> TGeomPointInstSet("{POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02}")
>>> TGeomPointInstSet(["POINT(1 1)@2020-01-01", "POINT(2 2)@2020-01-02"], srid=4326)
>>> TGeomPointInstSet([TGeomPointInst("POINT(1 1)@2020-01-01"), TGeomPointInst(
˓→"POINT(2 2)@2020-01-02")], srid=4326)

New TGeomPointSeq instances can be created either with a single string argument as in MobilityDB or with
several arguments: the list of composing instants, the left inclusion flag, the right inclusion flag, the interpolation, and
the SRID, where only the first argument is mandatory.
>>> from mobilitydb import TGeomPointSeq
>>> TGeomPointSeq("[POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02]")
>>> TGeomPointSeq("SRID=4326;[POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02]")
>>> TGeomPointSeq("SRID=4326,Interp=Stepwise;[POINT(1 1)@2020-01-01, POINT(2 2)@2020-
˓→01-02]")

>>> TGeomPointSeq(["POINT(1 1)@2020-01-01", "POINT(2 2)@2020-01-02"], lower_inc= True,


˓→ upper_inc=True, interp='Stepwise', srid=4326)

>>> TGeomPointSeq([TGeomPointInst("POINT(1 1)@2020-01-01"), TGeomPointInst("POINT(2


˓→2)@2020-01-02")], lower_inc= True, upper_inc=True, interp='Stepwise', srid=4326)

Finally, new TGeomPointSeqSet instances can be created either with a single string argument as in MobilityDB
or with several arguments: the list of composing sequences, the interpolation, and the SRID, where only the first
argument is mandatory.
>>> from mobilitydb import TGeomPointSeqSet
>>> TGeomPointSeqSet("{[POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02], [POINT(2
˓→2)@2020-01-03, POINT(1 1)@2020-01-04]}")

>>> TGeomPointSeqSet("SRID=4326;{[POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02],


˓→[POINT(2 2)@2020-01-03, POINT(1 1)@2020-01-04]}")

(continues on next page)

2.3. TGeomPoint and TGeogPoint 7


python-mobilitydb Documentation, Release 0.01

(continued from previous page)


>>> TGeomPointSeqSet(["[POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02]", "[POINT(2
˓→2)@2020-01-03, POINT(1 1)@2020-01-04]"], interp='Stepwise', srid=4326)

>>> TGeomPointSeqSet([TGeomPointSeq("[POINT(1 1)@2020-01-01, POINT(2 2)@2020-01-02]"),


˓→ TGeomPointSeq("[POINT(2 2)@2020-01-03, POINT(1 1)@2020-01-04]")], interp='Stepwise

˓→', srid=4326)

8 Chapter 2. Basic usage


CHAPTER

THREE

API REFERENCE

3.1 Time Types

class mobilitydb.time.Period(lower, upper=None, lower_inc=None, upper_inc=None)


Class for representing sets of contiguous timestamps between a lower and an upper bound. The bounds may be
inclusive or not.
Period objects can be created with a single argument of type string as in MobilityDB.

>>> Period('(2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01)')

Another possibility is to give a tuple of arguments as follows:


• lower and upper are instances of str or datetime specifying the bounds,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are inclusive or not.
By default, lower_inc is True and upper_inc is False.
Some examples are given next.

>>> Period('2019-09-08 00:00:00+01', '2019-09-10 00:00:00+01')


>>> Period('2019-09-08 00:00:00+01', '2019-09-10 00:00:00+01', False, True)
>>> Period(parse('2019-09-08 00:00:00+01'), parse('2019-09-10 00:00:00+01'))
>>> Period(parse('2019-09-08 00:00:00+01'), parse('2019-09-10 00:00:00+01'),
˓→False, True)

lower
Lower bound
upper
Upper bound
lower_inc
Is the lower bound inclusive?
upper_inc
Is the upper bound inclusive?
duration
Time interval on which the period is defined
shift(timedelta)
Shift the period by a time interval
overlap(other)
Do the periods share a timestamp?

9
python-mobilitydb Documentation, Release 0.01

contains_timestamp(datetime)
Does the period contain the timestamp?
class mobilitydb.time.TimestampSet(*argv)
Class for representing lists of distinct timestamp values.
TimestampSet objects can be created with a single argument of type string as in MobilityDB.
>>> TimestampSet('{2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01, 2019-09-11
˓→00:00:00+01}')

Another possibility is to give a tuple or list of composing timestamps, which can be instances of str or
datetime. The composing timestamps must be given in increasing order.
>>> TimestampSet(['2019-09-08 00:00:00+01', '2019-09-10 00:00:00+01', '2019-09-11
˓→00:00:00+01'])

>>> TimestampSet([parse('2019-09-08 00:00:00+01'), parse('2019-09-10 00:00:00+01


˓→'), parse('2019-09-11 00:00:00+01')])

>>> TimestampSet('2019-09-08 00:00:00+01', '2019-09-10 00:00:00+01', '2019-09-11


˓→00:00:00+01')

>>> TimestampSet(parse('2019-09-08 00:00:00+01'), parse('2019-09-10 00:00:00+01'),


˓→ parse('2019-09-11 00:00:00+01'))

timespan
Interval on which the timestamp set is defined ignoring the potential time gaps
period
Period on which the timestamp set is defined ignoring the potential time gaps
numTimestamps
Number of timestamps
startTimestamp
Start timestamp
endTimestamp
End timestamp
timestampN(n)
N-th timestamp
timestamps
Distinct timestamps
shift(timedelta)
Shift the timestamp set by a time interval
class mobilitydb.time.PeriodSet(*argv)
Class for representing lists of disjoint periods.
PeriodSet objects can be created with a single argument of type string as in MobilityDB.
>>> PeriodSet('{[2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01], [2019-09-11
˓→00:00:00+01, 2019-09-12 00:00:00+01]}')

Another possibility is to give a list or tuple specifying the composing periods, which can be instances of str or
Period. The composing periods must be given in increasing order.
>>> PeriodSet(['[2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01]', '[2019-09-11
˓→00:00:00+01, 2019-09-12 00:00:00+01]'])

>>> PeriodSet([Period('[2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01]'), Period(


˓→'[2019-09-11 00:00:00+01, 2019-09-12 00:00:00+01]')]) (continues on next page)

10 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

(continued from previous page)


>>> PeriodSet('[2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01]', '[2019-09-11
˓→00:00:00+01, 2019-09-12 00:00:00+01]')

>>> PeriodSet(Period('[2019-09-08 00:00:00+01, 2019-09-10 00:00:00+01]'), Period(


˓→'[2019-09-11 00:00:00+01, 2019-09-12 00:00:00+01]'))

duration
Time interval on which the period set is defined
timespan
Time interval on which the period set is defined
period
Period on which the period set is defined ignoring the potential time gaps
numTimestamps
Number of distinct timestamps
startTimestamp
Start timestamp
endTimestamp
End timestamp
timestampN(n)
N-th distinct timestamp
timestamps
Distinct timestamps
numPeriods
Number of periods
startPeriod
Start period
endPeriod
End period
periodN(n)
N-th period
periods
Periods
shift(timedelta)
Shift the period set by a time interval

3.2 Temporal Types


class mobilitydb.temporal.Temporal
Bases: object
Abstract class for representing temporal values of any subtype.
BaseClass = None
Class of the base type, for example, float for TFloat

3.2. Temporal Types 11


python-mobilitydb Documentation, Release 0.01

BaseClassDiscrete = None
Boolean value that states whether the base type is discrete or not, for example, True for int and False
for float
ComponentClass = None
Class of the components, for example,
1. TFloatInst for both TFloatI and TFloatSeq
2. TFloatSeq for TFloatS.
classmethod tempSubtype()
Subtype of the temporal value, that is, one of 'Instant', 'InstantSet', 'Sequence', or
'SequenceSet'.
getValues
List of distinct values taken by the temporal value.
startValue
Start value.
endValue
End value.
minValue
Minimum value.
maxValue
Maximum value.
valueAtTimestamp(timestamp)
Value at timestamp.
getTime
Period set on which the temporal value is defined.
duration
Interval on which the temporal value is defined.
timespan
Interval on which the temporal value is defined ignoring potential time gaps.
period
Period on which the temporal value is defined ignoring potential time gaps.
numInstants
Number of distinct instants.
startInstant
Start instant.
endInstant
End instant.
instantN(n)
N-th instant.
instants
List of instants.
numTimestamps
Number of distinct timestamps.

12 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

startTimestamp
Start timestamp.
endTimestamp
End timestamp.
timestampN(n)
N-th timestamp.
timestamps
List of timestamps.
shift(timedelta)
Shift the temporal value by a time interval
intersectsTimestamp(datetime)
Does the temporal value intersect the timestamp?
intersectsTimestampSet(timestampset)
Does the temporal value intersect the timestamp set?
intersectsPeriod(period)
Does the temporal value intersect the period?
intersectsPeriodSet(periodset)
Does the temporal value intersect the period set?
class mobilitydb.temporal.TemporalInstants
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal values of instant set or sequence subtype.
getValues
List of distinct values taken by the temporal value.
startValue
Start value.
endValue
End value.
minValue
Minimum value.
maxValue
Maximum value.
numInstants
Number of instants.
startInstant
Start instant.
endInstant
End instant.
instantN(n)
N-th instant.
instants
List of instants.
numTimestamps
Number of timestamps.

3.2. Temporal Types 13


python-mobilitydb Documentation, Release 0.01

startTimestamp
Start timestamp.
endTimestamp
End timestamp.
timestampN(n)
N-th timestamp.
timestamps
List of timestamps.
shift(timedelta)
Shift the temporal value by a time interval.
class mobilitydb.temporal.TInstant(value, time=None)
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal values of instant subtype.
classmethod tempSubtype()
Subtype of the temporal value, that is, 'Instant'.
getValue
Value component.
getValues
List of distinct values.
startValue
Start value.
endValue
End value.
minValue
Minimum value.
maxValue
Maximum value.
valueAtTimestamp(timestamp)
Value at timestamp.
getTimestamp
Timestamp.
getTime
Period set on which the temporal value is defined.
duration
Interval on which the temporal value is defined. It is zero for temporal values of instant subtype.
timespan
Interval on which the temporal value is defined ignoring the potential time gaps. It is zero for temporal
values of instant subtype.
period
Period on which the temporal value is defined ignoring the potential time gaps.
numInstants
Number of instants.

14 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

startInstant
Start instant.
endInstant
End instant.
instantN(n)
N-th instant.
instants
List of instants.
numTimestamps
Number of timestamps.
startTimestamp
Start timestamp.
endTimestamp
End timestamp.
timestampN(n)
N-th timestamp
timestamps
List of timestamps.
shift(timedelta)
Shift the temporal value by a time interval.
intersectsTimestamp(timestamp)
Does the temporal value intersect the timestamp?
intersectsPeriod(period)
Does the temporal value intersect the period?
class mobilitydb.temporal.TInstantSet(*argv)
Bases: mobilitydb.temporal.temporalinstants.TemporalInstants
Abstract class for representing temporal values of instant set subtype.
classmethod tempSubtype()
Subtype of the temporal value, that is, 'InstantSet'.
valueAtTimestamp(timestamp)
Value at timestamp.
getTime
Period set on which the temporal value is defined.
duration
Interval on which the temporal value is defined. It is zero for temporal values of instant set subtype.
timespan
Interval on which the temporal value is defined ignoring the potential time gaps.
period
Period on which the temporal value is defined ignoring the potential time gaps.
intersectsTimestamp(timestamp)
Does the temporal value intersect the timestamp?
intersectsPeriod(period)
Does the temporal value intersect the period?

3.2. Temporal Types 15


python-mobilitydb Documentation, Release 0.01

class mobilitydb.temporal.TSequence(instantList, lower_inc=None, upper_inc=None, in-


terp=None)
Bases: mobilitydb.temporal.temporalinstants.TemporalInstants
Abstract class for representing temporal values of sequence subtype.
classmethod tempSubtype()
Subtype of the temporal value, that is, 'Sequence'.
lower_inc
Is the lower bound inclusive?
upper_inc
Is the upper bound inclusive?
valueAtTimestamp(timestamp)
Value at timestamp.
getTime
Period set on which the temporal value is defined.
duration
Interval on which the temporal value is defined.
timespan
Interval on which the temporal value is defined.
period
Period on which the temporal value is defined.
numSequences
Number of sequences.
startSequence
Start sequence.
endSequence
End sequence.
sequenceN(n)
N-th sequence.
sequences
List of sequences.
intersectsTimestamp(timestamp)
Does the temporal value intersect the timestamp?
intersectsPeriod(period)
Does the temporal value intersect the period?
class mobilitydb.temporal.TSequenceSet(sequenceList, interp=None)
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal values of sequence set subtype.
classmethod tempSubtype()
Subtype of the temporal value, that is, 'SequenceSet'.
getValues
List of distinct values taken by the temporal value.
startValue
Start value.

16 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

endValue
End value.
minValue
Minimum value.
maxValue
Maximum value.
valueAtTimestamp(timestamp)
Value at timestamp.
getTime
Period set on which the temporal value is defined.
duration
Interval on which the period set is defined.
timespan
Interval on which the period set is defined ignoring the potential time gaps.
period
Period on which the temporal value is defined ignoring the potential time gaps.
numInstants
Number of distinct instants.
startInstant
Start instant.
endInstant
End instant.
instantN(n)
N-th distinct instant.
instants
List of instants.
numTimestamps
Number of distinct timestamps.
startTimestamp
Start timestamp.
endTimestamp
End timestamp.
timestampN(n)
N-th distinct timestamp.
timestamps
List of timestamps.
numSequences
Number of sequences.
startSequence
Start sequence.
endSequence
End sequence.

3.2. Temporal Types 17


python-mobilitydb Documentation, Release 0.01

sequenceN(n)
N-th sequence.
sequences
List of sequences.
shift(timedelta)
Shift the temporal value by a time interval.
intersectsTimestamp(timestamp)
Does the temporal value intersect the timestamp?
intersectsPeriod(period)
Does the temporal value intersect the period?

3.3 Box Types


class mobilitydb.boxes.TBox(xmin, tmin=None, xmax=None, tmax=None)
Bases: object
Class for representing bounding boxes with value (X) and/or time (T) dimensions.
TBox objects can be created with a single argument of type string as in MobilityDB.

>>> TBox("TBOX((1.0, 2000-01-01), (2.0, 2000-01-02))")


>>> TBox("TBOX((1.0,), (2.0,))")
>>> TBox("TBOX((, 2000-01-01), (, 2000-01-02))")

Another possibility is to give the bounds in the following order: xmin, tmin, xmax, tmax, where the bounds
can be instances of str, float or datetime. All arguments are optional but they must be given in pairs for
each dimension and at least one pair must be given.

>>> TBox("1.0", "2000-01-01", "2.0", "2000-01-02")


>>> TBox(1.0, 2.0)
>>> TBox(parse("2000-01-01"), parse("2000-01-02"))

xmin
Minimum X
tmin
Minimum T
xmax
Maximum X
tmax
Maximum T
class mobilitydb.boxes.STBox(bounds, dimt=None, geodetic=None, srid=None)
Bases: object
Class for representing bounding boxes composed of coordinate and/or time dimensions, where the coordinates
may be in 2D (X and Y) or in 3D (X, Y, and Z). For each dimension, minimum and maximum values are stored.
The coordinates may be either Cartesian (planar) or geodetic (spherical). Additionally, the SRID of coordinates
can be specified.
STBox objects can be created with a single argument of type string as in MobilityDB.

18 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

>>> "STBOX ((1.0, 2.0), (1.0, 2.0))",


>>> "STBOX Z((1.0, 2.0, 3.0), (1.0, 2.0, 3.0))",
>>> "STBOX T((1.0, 2.0, 2001-01-03 00:00:00+01), (1.0, 2.0, 2001-01-03
˓→00:00:00+01))",

>>> "STBOX ZT((1.0, 2.0, 3.0, 2001-01-04 00:00:00+01), (1.0, 2.0, 3.0, 2001-01-04
˓→00:00:00+01))",

>>> "STBOX T(, 2001-01-03 00:00:00+01), (, 2001-01-03 00:00:00+01))",


>>> "GEODSTBOX((1.0, 2.0, 3.0), (1.0, 2.0, 3.0))",
>>> "GEODSTBOX T((1.0, 2.0, 3.0, 2001-01-03 00:00:00+01), (1.0, 2.0, 3.0, 2001-01-
˓→04 00:00:00+01))",

>>> "GEODSTBOX T((, 2001-01-03 00:00:00+01), (, 2001-01-03 00:00:00+01))",


>>> "SRID=5676;STBOX T((1.0, 2.0, 2001-01-04), (1.0, 2.0, 2001-01-04))",
>>> "SRID=4326;GEODSTBOX((1.0, 2.0, 3.0), (1.0, 2.0, 3.0))",

Another possibility is to give the bounds in the following order: xmin, ymin, zmin, tmin, xmax, ymax,
zmax, tmax, where the bounds can be instances of str, float and datetime. All arguments are optional
but they must be given in pairs for each dimension and at least one pair must be given. When three pairs are
given, by default, the third pair will be interpreted as representing the Z dimension unless the dimt parameter
is given. Finally, the geodetic parameter determines whether the coordinates in the bounds are planar or
spherical.

>>> STBox((1.0, 2.0, 1.0, 2.0))


>>> STBox((1.0, 2.0, 3.0, 1.0, 2.0, 3.0))
>>> STBox((1.0, 2.0, '2001-01-03', 1.0, 2.0, '2001-01-03'), dimt=True)
>>> STBox((1.0, 2.0, 3.0, '2001-01-04', 1.0, 2.0, 3.0, '2001-01-04'))
>>> STBox(('2001-01-03', '2001-01-03'))
>>> STBox((1.0, 2.0, 3.0, 1.0, 2.0, 3.0), geodetic=True)
>>> STBox((1.0, 2.0, 3.0, '2001-01-04', 1.0, 2.0, 3.0, '2001-01-03'),
˓→geodetic=True)

>>> STBox((1.0, 2.0, 3.0, '2001-01-04', 1.0, 2.0, 3.0, '2001-01-03'),


˓→geodetic=True, srid=4326)

>>> STBox(('2001-01-03', '2001-01-03'), geodetic=True)

xmin
Minimum X
ymin
Minimum Y
zmin
Minimum Z
tmin
Minimum T
xmax
Maximum X
ymax
Maximum Y
zmax
Maximum Z
tmax
Maximum T
geodetic
Is the box is geodetic?

3.3. Box Types 19


python-mobilitydb Documentation, Release 0.01

srid
SRID of the geographic coordinates

3.4 Main Types


class mobilitydb.main.TBool
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal Booleans of any subtype.
BaseClass
alias of builtins.bool
class mobilitydb.main.TBoolInst(value, time=None)
Bases: mobilitydb.temporal.tinstant.TInstant, mobilitydb.main.tbool.TBool
Class for representing temporal Booleans of instant subtype.
TBoolInst objects can be created with a single argument of type string as in MobilityDB.
>>> TBoolInst('true@2019-09-01')

Another possibility is to give the value and the time arguments, which can be instances of str, bool, or
datetime.
>>> TBoolInst('True', '2019-09-08 00:00:00+01')
>>> TBoolInst(['True', '2019-09-08 00:00:00+01'])
>>> TBoolInst(True, parse('2019-09-08 00:00:00+01'))
>>> TBoolInst([True, parse('2019-09-08 00:00:00+01')])

class mobilitydb.main.TBoolInstSet(*argv)
Bases: mobilitydb.temporal.tinstantset.TInstantSet, mobilitydb.main.tbool.
TBool
Class for representing temporal Booleans of instant set subtype.
TBoolInstSet objects can be created with a single argument of type string as in MobilityDB.
>>> TBoolInstSet('AA@2019-09-01')

Another possibility is to give a tuple or list of arguments, which can be instances of str or TBoolInst.
>>> TBoolInstSet('AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01',
˓→'AA@2019-09-03 00:00:00+01')

>>> TBoolInstSet(TBoolInst('AA@2019-09-01 00:00:00+01'), TBoolInst('BB@2019-09-02


˓→00:00:00+01'), TBoolInst('AA@2019-09-03 00:00:00+01'))

>>> TBoolInstSet(['AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01',


˓→'AA@2019-09-03 00:00:00+01'])

>>> TBoolInstSet([TBoolInst('AA@2019-09-01 00:00:00+01'), TBoolInst('BB@2019-09-


˓→02 00:00:00+01'), TBoolInst('AA@2019-09-03 00:00:00+01')])

ComponentClass
alias of TBoolInst
class mobilitydb.main.TBoolSeq(instantList, lower_inc=None, upper_inc=None)
Bases: mobilitydb.temporal.tsequence.TSequence, mobilitydb.main.tbool.TBool
Class for representing temporal Booleans of sequence subtype.
TBoolSeq objects can be created with a single argument of type string as in MobilityDB.

20 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

>>> TBoolSeq('[true@2019-09-01 00:00:00+01, false@2019-09-02 00:00:00+01,


˓→true@2019-09-03 00:00:00+01]')

Another possibility is to give the arguments as follows.


• instantList is the list of composing instants, which can be instances of str or TBoolInst,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are inclusive or not.
By default lower_inc is True and upper_inc is False.
Some examples are given next.

>>> TBoolSeq(['true@2019-09-01 00:00:00+01', 'false@2019-09-02 00:00:00+01',


˓→'true@2019-09-03 00:00:00+01'])

>>> TBoolSeq(TBoolInst('true@2019-09-01 00:00:00+01'), TBoolInst('false@2019-09-


˓→02 00:00:00+01'), TBoolInst('true@2019-09-03 00:00:00+01')])

>>> TBoolSeq(['true@2019-09-01 00:00:00+01', 'false@2019-09-02 00:00:00+01',


˓→'true@2019-09-03 00:00:00+01'], True, True)

>>> TBoolSeq([TBoolInst('true@2019-09-01 00:00:00+01'), TBoolInst('false@2019-09-


˓→02 00:00:00+01'), TBoolInst('true@2019-09-03 00:00:00+01')], True, True)

ComponentClass
alias of TBoolInst
classmethod interpolation()
Interpolation of the temporal value, that is, 'Stepwise'.
class mobilitydb.main.TBoolSeqSet(sequenceList)
Bases: mobilitydb.temporal.tsequenceset.TSequenceSet, mobilitydb.main.tbool.
TBool
Class for representing temporal Booleans of sequence set subtype.
TBoolSeqSet objects can be created with a single argument of type string as in MobilityDB.

>>> TBoolSeqSet('{[true@2019-09-01 00:00:00+01], [false@2019-09-02 00:00:00+01,


˓→true@2019-09-03 00:00:00+01]}')

Another possibility is to give the list of composing sequences, which can be instances of str or TBoolSeq.

>>> TBoolSeqSet(['[true@2019-09-01 00:00:00+01]', '[false@2019-09-02 00:00:00+01,


˓→true@2019-09-03 00:00:00+01]'])

>>> TBoolSeqSet([TBoolSeq('[true@2019-09-01 00:00:00+01]'), TBoolSeq('[false@2019-


˓→09-02 00:00:00+01, true@2019-09-03 00:00:00+01]')])

>>> TBoolSeqSet([TBoolSeq('[true@2019-09-01 00:00:00+01]'), TBoolSeq('[false@2019-


˓→09-02 00:00:00+01, true@2019-09-03 00:00:00+01]')])

ComponentClass
alias of TBoolSeq
classmethod interpolation()
Interpolation of the temporal value, that is, 'Stepwise'.
class mobilitydb.main.TInt
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal integers of any subtype.
BaseClass
alias of builtins.int

3.4. Main Types 21


python-mobilitydb Documentation, Release 0.01

valueRange
Range of values taken by the temporal value as defined by its minimum and maximum value
class mobilitydb.main.TIntInst(value, time=None)
Bases: mobilitydb.temporal.tinstant.TInstant, mobilitydb.main.tint.TInt
Class for representing temporal integers of instant subtype.
TIntInst objects can be created with a single argument of type string as in MobilityDB.

>>> TIntInst('10@2019-09-01')

Another possibility is to give the value and the time arguments, which can be instances of str, int or
datetime.

>>> TIntInst('10', '2019-09-08 00:00:00+01')


>>> TIntInst(['10', '2019-09-08 00:00:00+01'])
>>> TIntInst(10, parse('2019-09-08 00:00:00+01'))
>>> TIntInst([10, parse('2019-09-08 00:00:00+01')])

class mobilitydb.main.TIntInstSet(*argv)
Bases: mobilitydb.temporal.tinstantset.TInstantSet, mobilitydb.main.tint.TInt
Class for representing temporal integers of instant set subtype.
TIntInstSet objects can be created with a single argument of type string as in MobilityDB.

>>> TIntInstSet('10@2019-09-01')

Another possibility is to give a tuple or list of composing instants, which can be instances of str or TIntInst.

>>> TIntInstSet('10@2019-09-01 00:00:00+01', '20@2019-09-02 00:00:00+01',


˓→'10@2019-09-03 00:00:00+01')

>>> TIntInstSet(TIntInst('10@2019-09-01 00:00:00+01'), TIntInst('20@2019-09-02


˓→00:00:00+01'), TIntInst('10@2019-09-03 00:00:00+01'))

>>> TIntInstSet(['10@2019-09-01 00:00:00+01', '20@2019-09-02 00:00:00+01',


˓→'10@2019-09-03 00:00:00+01'])

>>> TIntInstSet([TIntInst('10@2019-09-01 00:00:00+01'), TIntInst('20@2019-09-02


˓→00:00:00+01'), TIntInst('10@2019-09-03 00:00:00+01')])

ComponentClass
alias of TIntInst
class mobilitydb.main.TIntSeq(instantList, lower_inc=None, upper_inc=None)
Bases: mobilitydb.temporal.tsequence.TSequence, mobilitydb.main.tint.TInt
Class for representing temporal integers of sequence subtype.
TIntSeq objects can be created with a single argument of type string as in MobilityDB.

>>> TIntSeq('[10@2019-09-01 00:00:00+01, 20@2019-09-02 00:00:00+01, 10@2019-09-03


˓→00:00:00+01]')

Another possibility is to give the arguments as follows:


• instantList is the list of composing instants, which can be instances of str or TIntInst,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are inclusive or not.
By default lower_inc is True and upper_inc is False.
Some examples are given next.

22 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

>>> TIntSeq(['10@2019-09-01 00:00:00+01', '20@2019-09-02 00:00:00+01', '10@2019-


˓→09-03 00:00:00+01'])

>>> TIntSeq([TIntInst('10@2019-09-01 00:00:00+01'), TIntInst('20@2019-09-02


˓→00:00:00+01'), TIntInst('10@2019-09-03 00:00:00+01')])

>>> TIntSeq(['10@2019-09-01 00:00:00+01', '20@2019-09-02 00:00:00+01', '10@2019-


˓→09-03 00:00:00+01'], True, True)

>>> TIntSeq([TIntInst('10@2019-09-01 00:00:00+01'), TIntInst('20@2019-09-02


˓→00:00:00+01'), TIntInst('10@2019-09-03 00:00:00+01')], True, True)

ComponentClass
alias of TIntInst
classmethod interpolation()
Interpolation of the temporal value, that is, 'Stepwise'.
class mobilitydb.main.TIntSeqSet(sequenceList)
Bases: mobilitydb.temporal.tsequenceset.TSequenceSet, mobilitydb.main.tint.
TInt
Class for representing temporal integers of sequence subtype.
TIntSeqSet objects can be created with a single argument of type string as in MobilityDB.

>>> TIntSeqSet('{[10@2019-09-01 00:00:00+01], [20@2019-09-02 00:00:00+01, 10@2019-


˓→09-03 00:00:00+01]}')

Another possibility is to give the list of composing sequences, which can be instances of str or TIntSeq.

>>> TIntSeqSet(['[10@2019-09-01 00:00:00+01]', '[20@2019-09-02 00:00:00+01,


˓→10@2019-09-03 00:00:00+01]'])

>>> TIntSeqSet([TIntSeq('[10@2019-09-01 00:00:00+01]'), TIntSeq('[20@2019-09-02


˓→00:00:00+01, 10@2019-09-03 00:00:00+01]')])

>>> TIntSeqSet([TIntSeq('[10@2019-09-01 00:00:00+01]'), TIntSeq('[20@2019-09-02


˓→00:00:00+01, 10@2019-09-03 00:00:00+01]')])

ComponentClass
alias of TIntSeq
classmethod interpolation()
Interpolation of the temporal value, that is, 'Stepwise'.
class mobilitydb.main.TFloat
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal floats of any subtype.
BaseClass
alias of builtins.float
valueRange
Range of values taken by the temporal value as defined by its minimum and maximum value
class mobilitydb.main.TFloatInst(value, time=None)
Bases: mobilitydb.temporal.tinstant.TInstant, mobilitydb.main.tfloat.TFloat
Class for representing temporal floats of instant subtype.
TFloatInst objects can be created with a single argument of type string as in MobilityDB.

>>> TFloatInst('10.0@2019-09-01')

3.4. Main Types 23


python-mobilitydb Documentation, Release 0.01

Another possibility is to give the value and the time arguments, which can be instances of str, float or
datetime.

>>> TFloatInst('10.0', '2019-09-08 00:00:00+01')


>>> TFloatInst(['10.0', '2019-09-08 00:00:00+01'])
>>> TFloatInst(10.0, parse('2019-09-08 00:00:00+01'))
>>> TFloatInst([10.0, parse('2019-09-08 00:00:00+01')])

getValues
List of ranges representing the values taken by the temporal value
class mobilitydb.main.TFloatInstSet(*argv)
Bases: mobilitydb.temporal.tinstantset.TInstantSet, mobilitydb.main.tfloat.
TFloat
Class for representing temporal floats of instant set subtype.
TFloatInstSet objects can be created with a single argument of type string as in MobilityDB.

>>> TFloatInstSet('10.0@2019-09-01')

Another possibility is to give a tuple or list of composing instants, which can be instances of str or
TFloatInst.

>>> TFloatInstSet('10.0@2019-09-01 00:00:00+01', '20.0@2019-09-02 00:00:00+01',


˓→'10.0@2019-09-03 00:00:00+01')

>>> TFloatInstSet(TFloatInst('10.0@2019-09-01 00:00:00+01'), TFloatInst('20.


˓→0@2019-09-02 00:00:00+01'), TFloatInst('10.0@2019-09-03 00:00:00+01'))

>>> TFloatInstSet(['10.0@2019-09-01 00:00:00+01', '20.0@2019-09-02 00:00:00+01',


˓→'10.0@2019-09-03 00:00:00+01'])

>>> TFloatInstSet([TFloatInst('10.0@2019-09-01 00:00:00+01'), TFloatInst('20.


˓→0@2019-09-02 00:00:00+01'), TFloatInst('10.0@2019-09-03 00:00:00+01')])

ComponentClass
alias of TFloatInst
getValues
List of ranges representing the values taken by the temporal value.
class mobilitydb.main.TFloatSeq(instantList, lower_inc=None, upper_inc=None, interp=None)
Bases: mobilitydb.temporal.tsequence.TSequence, mobilitydb.main.tfloat.TFloat
Class for representing temporal floats of sequence subtype.
TFloatSeq objects can be created with a single argument of type string as in MobilityDB.

>>> TFloatSeq('[10.0@2019-09-01 00:00:00+01, 20.0@2019-09-02 00:00:00+01, 10.


˓→0@2019-09-03 00:00:00+01]')

>>> TFloatSeq('Interp=Stepwise;[10.0@2019-09-01 00:00:00+01, 20.0@2019-09-02


˓→00:00:00+01, 10.0@2019-09-03 00:00:00+01]')

Another possibility is to give the arguments as follows:


• instantList is the list of composing instants, which can be instances of str or TFloatInst,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are inclusive or not.
By default lower_inc is True and upper_inc is False.
• interp which is either 'Linear' or 'Stepwise', the former being the default.
Some examples are shown next.

24 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

>>> TFloatSeq(['10.0@2019-09-01 00:00:00+01', '20.0@2019-09-02 00:00:00+01', '10.


˓→0@2019-09-03 00:00:00+01'])

>>> TFloatSeq([TFloatInst('10.0@2019-09-01 00:00:00+01'), TFloatInst('20.0@2019-


˓→09-02 00:00:00+01'), TFloatInst('10.0@2019-09-03 00:00:00+01')])

>>> TFloatSeq(['10.0@2019-09-01 00:00:00+01', '20.0@2019-09-02 00:00:00+01', '10.


˓→0@2019-09-03 00:00:00+01'], True, True, 'Stepwise')

>>> TFloatSeq([TFloatInst('10.0@2019-09-01 00:00:00+01'), TFloatInst('20.0@2019-


˓→09-02 00:00:00+01'), TFloatInst('10.0@2019-09-03 00:00:00+01')], True, True,

˓→'Stepwise')

ComponentClass
alias of TFloatInst
interpolation
Interpolation of the temporal value, which is either 'Linear' or 'Stepwise'.
getValues
List of ranges representing the values taken by the temporal value.
class mobilitydb.main.TFloatSeqSet(sequenceList, interp=None)
Bases: mobilitydb.temporal.tsequenceset.TSequenceSet, mobilitydb.main.tfloat.
TFloat
Class for representing temporal floats of sequence subtype.
TFloatSeqSet objects can be created with a single argument of type string as in MobilityDB.

>>> TFloatSeqSet('{[10.0@2019-09-01 00:00:00+01], [20.0@2019-09-02 00:00:00+01,


˓→10.0@2019-09-03 00:00:00+01]}')

>>> TFloatSeqSet('Interp=Stepwise;{[10.0@2019-09-01 00:00:00+01], [20.0@2019-09-


˓→02 00:00:00+01, 10.0@2019-09-03 00:00:00+01]}')

Another possibility is to give the arguments as follows:


• sequenceList is a list of composing sequences, which can be instances of str or TFloatSeq,
• interp can be 'Linear' or 'Stepwise', the former being the default.
Some examples are shown next.

>>> TFloatSeqSet(['[10.0@2019-09-01 00:00:00+01]', '[20.0@2019-09-02 00:00:00+01,


˓→10.0@2019-09-03 00:00:00+01]'])

>>> TFloatSeqSet(['[10.0@2019-09-01 00:00:00+01]', '[20.0@2019-09-02 00:00:00+01,


˓→10.0@2019-09-03 00:00:00+01]'], 'Linear')

>>> TFloatSeqSet(['Interp=Stepwise;[10.0@2019-09-01 00:00:00+01]',


˓→'Interp=Stepwise;[20.0@2019-09-02 00:00:00+01, 10.0@2019-09-03 00:00:00+01]'],

˓→'Stepwise')

>>> TFloatSeqSet([TFloatSeq('[10.0@2019-09-01 00:00:00+01]'), TFloatSeq('[20.


˓→0@2019-09-02 00:00:00+01, 10.0@2019-09-03 00:00:00+01]')])

>>> TFloatSeqSet([TFloatSeq('[10.0@2019-09-01 00:00:00+01]'), TFloatSeq('[20.


˓→0@2019-09-02 00:00:00+01, 10.0@2019-09-03 00:00:00+01]')], 'Linear')

>>> TFloatSeqSet([TFloatSeq('Interp=Stepwise;[10.0@2019-09-01 00:00:00+01]'),


˓→TFloatSeq('Interp=Stepwise;[20.0@2019-09-02 00:00:00+01, 10.0@2019-09-03

˓→00:00:00+01]')], 'Stepwise')

ComponentClass
alias of TFloatSeq
interpolation
Interpolation of the temporal value, which is either 'Linear' or 'Stepwise'.

3.4. Main Types 25


python-mobilitydb Documentation, Release 0.01

getValues
List of ranges representing the values taken by the temporal value
class mobilitydb.main.TText
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal strings of any subtype.
BaseClass
alias of builtins.str
class mobilitydb.main.TTextInst(value, time=None)
Bases: mobilitydb.temporal.tinstant.TInstant, mobilitydb.main.ttext.TText
Class for representing temporal strings of instant subtype.
TTextInst objects can be created with a single argument of type string as in MobilityDB.
>>> TTextInst('AA@2019-09-01')

Another possibility is to give the value and the time arguments, which can be instances of str or
datetime.
>>> TTextInst('AA', '2019-09-08 00:00:00+01')
>>> TTextInst(['AA', '2019-09-08 00:00:00+01'])
>>> TTextInst('AA', parse('2019-09-08 00:00:00+01'))
>>> TTextInst(['AA', parse('2019-09-08 00:00:00+01')])

class mobilitydb.main.TTextInstSet(*argv)
Bases: mobilitydb.temporal.tinstantset.TInstantSet, mobilitydb.main.ttext.
TText
Class for representing temporal strings of instant set subtype.
TTextInstSet objects can be created with a single argument of type string as in MobilityDB.
>>> TTextInstSet('AA@2019-09-01')

Another possibility is to give a tuple or list of composing instants, which can be instances of str or
TTextInst.
>>> TTextInstSet('AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01',
˓→'AA@2019-09-03 00:00:00+01')

>>> TTextInstSet(TTextInst('AA@2019-09-01 00:00:00+01'), TTextInst('BB@2019-09-02


˓→00:00:00+01'), TTextInst('AA@2019-09-03 00:00:00+01'))

>>> TTextInstSet(['AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01',


˓→'AA@2019-09-03 00:00:00+01'])

>>> TTextInstSet([TTextInst('AA@2019-09-01 00:00:00+01'), TTextInst('BB@2019-09-


˓→02 00:00:00+01'), TTextInst('AA@2019-09-03 00:00:00+01')])

ComponentClass
alias of TTextInst
class mobilitydb.main.TTextSeq(instantList, lower_inc=None, upper_inc=None)
Bases: mobilitydb.temporal.tsequence.TSequence, mobilitydb.main.ttext.TText
Class for representing temporal strings of sequence subtype.
TTextSeq objects can be created with a single argument of type string as in MobilityDB.
>>> TTextSeq('[AA@2019-09-01 00:00:00+01, BB@2019-09-02 00:00:00+01, AA@2019-09-
˓→03 00:00:00+01]')
(continues on next page)

26 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

(continued from previous page)

Another possibility is to give the arguments as follows:


• instantList is the list of composing instants, which can be instances of str or TTextInst,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are inclusive or not.
By default lower_inc is True and upper_inc is False.
Some examples are given next.

>>> TTextSeq(['AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01', 'AA@2019-


˓→09-03 00:00:00+01'])

>>> TTextSeq(TTextInst('AA@2019-09-01 00:00:00+01'), TTextInst('BB@2019-09-02


˓→00:00:00+01'), TTextInst('AA@2019-09-03 00:00:00+01')])

>>> TTextSeq(['AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01', 'AA@2019-


˓→09-03 00:00:00+01'], True, True)

>>> TTextSeq([TTextInst('AA@2019-09-01 00:00:00+01'), TTextInst('BB@2019-09-02


˓→00:00:00+01'), TTextInst('AA@2019-09-03 00:00:00+01')], True, True)

ComponentClass
alias of TTextInst
classmethod interpolation()
Interpolation of the temporal value, that is, 'Stepwise'.
class mobilitydb.main.TTextSeqSet(sequenceList)
Bases: mobilitydb.temporal.tsequenceset.TSequenceSet, mobilitydb.main.ttext.
TText
Class for representing temporal strings of sequence subtype.
TTextSeqSet objects can be created with a single argument of typestring as in MobilityDB.

>>> TTextSeqSet('{[AA@2019-09-01 00:00:00+01], [BB@2019-09-02 00:00:00+01,


˓→AA@2019-09-03 00:00:00+01]}')

Another possibility is to give the list of composing sequences, which can be instances of str or TTextSeq.

>>> TTextSeqSet(['[AA@2019-09-01 00:00:00+01]', '[BB@2019-09-02 00:00:00+01,


˓→AA@2019-09-03 00:00:00+01]'])

>>> TTextSeqSet([TTextSeq('[AA@2019-09-01 00:00:00+01]'), TTextSeq('[BB@2019-09-


˓→02 00:00:00+01, AA@2019-09-03 00:00:00+01]')])

>>> TTextSeqSet([TTextSeq('[AA@2019-09-01 00:00:00+01]'), TTextSeq('[BB@2019-09-


˓→02 00:00:00+01, AA@2019-09-03 00:00:00+01]')])

ComponentClass
alias of TTextSeq
classmethod interpolation()
Interpolation of the temporal value, that is, 'Stepwise'.
class mobilitydb.main.TPointInst(value, time=None, srid=None)
Bases: mobilitydb.temporal.tinstant.TInstant
Abstract class for representing temporal points of instant subtype.
getValues
Geometry representing the values taken by the temporal value.

3.4. Main Types 27


python-mobilitydb Documentation, Release 0.01

class mobilitydb.main.TPointInstSet(*argv, srid=None)


Bases: mobilitydb.temporal.tinstantset.TInstantSet
Abstract class for representing temporal points of instant set subtype.
getValues
Geometry representing the values taken by the temporal value.
class mobilitydb.main.TPointSeq(instantList, lower_inc=None, upper_inc=None, interp=None,
srid=None)
Bases: mobilitydb.temporal.tsequence.TSequence
Abstract class for representing temporal points of sequence subtype.
interpolation
Interpolation of the temporal value, which is either 'Linear' or 'Stepwise'.
getValues
Geometry representing the values taken by the temporal value.
class mobilitydb.main.TPointSeqSet(sequenceList, interp=None, srid=None)
Bases: mobilitydb.temporal.tsequenceset.TSequenceSet
Abstract class for representing temporal points of sequence set subtype.
interpolation
Interpolation of the temporal value, which is either 'Linear' or 'Stepwise'.
getValues
Geometry representing the values taken by the temporal value.
class mobilitydb.main.TGeomPoint
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal geometric or geographic points of any subtype.
hasz
Does the temporal point has Z dimension?
srid
Returns the SRID.
class mobilitydb.main.TGeomPointInst(value, time=None, srid=None)
Bases: mobilitydb.main.tpoint.TPointInst, mobilitydb.main.tpoint.TGeomPoint
Class for representing temporal geometric points of instant subtype.
TGeomPointInst objects can be created with a single argument of type string as in MobilityDB.

>>> TGeomPointInst('Point(10.0 10.0)@2019-09-01')


>>> TGeomPointInst('SRID=4326,Point(10.0 10.0)@2019-09-01')

Another possibility is to give the value and the time arguments, which can be instances of str, Point or
datetime. Additionally, the SRID can be specified, it will be 0 by default if not given.

>>> TGeomPointInst('Point(10.0 10.0)', '2019-09-08 00:00:00+01', 4326)


>>> TGeomPointInst(['Point(10.0 10.0)', '2019-09-08 00:00:00+01', 4326])
>>> TGeomPointInst(Point(10.0, 10.0), parse('2019-09-08 00:00:00+01'), 4326)
>>> TGeomPointInst([Point(10.0, 10.0), parse('2019-09-08 00:00:00+01'), 4326])

class mobilitydb.main.TGeomPointInstSet(*argv, **kwargs)


Bases: mobilitydb.main.tpoint.TPointInstSet, mobilitydb.main.tpoint.
TGeomPoint

28 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

Class for representing temporal geometric points of instant set subtype.


TGeomPointInstSet objects can be created with a single argument of type string as in MobilityDB.

>>> TGeomPointInstSet('Point(10.0 10.0)@2019-09-01')

Another possibility is to give a tuple or list of arguments specifying the composing instants, which can be
instances of str or TGeomPointInst.

>>> TGeomPointInstSet('Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01')

>>> TGeomPointInstSet(TGeomPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeomPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeomPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01'))

>>> TGeomPointInstSet(['Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01'])

>>> TGeomPointInstSet([TGeomPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeomPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeomPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01')])

ComponentClass
alias of TGeomPointInst
class mobilitydb.main.TGeomPointSeq(instantList, lower_inc=None, upper_inc=None, in-
terp=None, srid=None)
Bases: mobilitydb.main.tpoint.TPointSeq, mobilitydb.main.tpoint.TGeomPoint
Class for representing temporal geometric points of sequence subtype.
TGeomPointSeq objects can be created with a single argument of type string as in MobilityDB.

>>> TGeomPointSeq('[Point(10.0 10.0)@2019-09-01 00:00:00+01, Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]')

>>> TGeomPointSeq('Interp=Stepwise;[Point(10.0 10.0)@2019-09-01 00:00:00+01,


˓→Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03

˓→00:00:00+01]')

Another possibility is to give the arguments as follows:


• instantList is the list of composing instants, which can be instances of str or TGeogPointInst,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are inclusive or not,
where by default ‘lower_inc‘ is True and upper_inc is False,
• interp which is either 'Linear' or 'Stepwise', the former being the default, and
• srid is an integer specifiying the SRID
Some examples are shown next.

>>> TGeomPointSeq(['Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01'])

>>> TGeomPointSeq([TGeomPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeomPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeomPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01')])

>>> TGeomPointSeq(['Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01'], True,

˓→True, 'Stepwise')

>>> TGeomPointSeq([TGeomPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeomPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeomPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01')], True, True, 'Stepwise')

3.4. Main Types 29


python-mobilitydb Documentation, Release 0.01

ComponentClass
alias of TGeomPointInst
class mobilitydb.main.TGeomPointSeqSet(sequenceList, interp=None, srid=None)
Bases: mobilitydb.main.tpoint.TPointSeqSet, mobilitydb.main.tpoint.TGeomPoint
Class for representing temporal geometric points of sequence subtype.
TGeomPointSeqSet objects can be created with a single argument of type string as in MobilityDB.

>>> TGeomPointSeqSet('{[Point(10.0 10.0)@2019-09-01 00:00:00+01], [Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]}')

>>> TGeomPointSeqSet('Interp=Stepwise;{[Point(10.0 10.0)@2019-09-01 00:00:00+01],


˓→[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03

˓→00:00:00+01]}')

Another possibility is to give the arguments as follows:


• sequenceList is the list of composing sequences, which can be instances of str or
TGeomPointSeq,
• interp can be 'Linear' or 'Stepwise', the former being the default, and
• srid is an integer specifiying the SRID, if will be 0 by default if not given.
Some examples are shown next.

>>> TGeomPointSeqSet(['[Point(10.0 10.0)@2019-09-01 00:00:00+01]', '[Point(20.0


˓→20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]'])

>>> TGeomPointSeqSet(['[Point(10.0 10.0)@2019-09-01 00:00:00+01]', '[Point(20.0


˓→20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]'],

˓→'Linear')

>>> TGeomPointSeqSet(['Interp=Stepwise;[Point(10.0 10.0)@2019-09-01 00:00:00+01]',


˓→ 'Interp=Stepwise;[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.

˓→0)@2019-09-03 00:00:00+01]'], 'Stepwise')

>>> TGeomPointSeqSet([TGeomPointSeq('[Point(10.0 10.0)@2019-09-01 00:00:00+01]'),


˓→TGeomPointSeq('[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-

˓→09-03 00:00:00+01]')])

>>> TGeomPointSeqSet([TGeomPointSeq('[Point(10.0 10.0)@2019-09-01 00:00:00+01]'),


˓→ TGeomPointSeq('[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-

˓→09-03 00:00:00+01]')], 'Linear')

>>> TGeomPointSeqSet([TGeomPointSeq('Interp=Stepwise;[Point(10.0 10.0)@2019-09-01


˓→00:00:00+01]'), TGeomPointSeq('Interp=Stepwise;[Point(20.0 20.0)@2019-09-02

˓→00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]')], 'Stepwise')

ComponentClass
alias of TGeomPointSeq
class mobilitydb.main.TGeogPoint
Bases: mobilitydb.temporal.temporal.Temporal
Abstract class for representing temporal geographic points of any subtype.
hasz
Does the temporal point has Z dimension?
srid
Returns the SRID.
class mobilitydb.main.TGeogPointInst(value, time=None, srid=None)
Bases: mobilitydb.main.tpoint.TPointInst, mobilitydb.main.tpoint.TGeogPoint
Class for representing temporal geographic points of instant subtype.

30 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

TGeogPointInst objects can be created with a single argument of type string as in MobilityDB.

>>> TGeogPointInst('Point(10.0 10.0)@2019-09-01')

Another possibility is to give the value and the time arguments, which can be instances of str, Point or
datetime. Additionally, the SRID can be specified, it will be 0 by default if not given.

>>> TGeogPointInst('Point(10.0 10.0)', '2019-09-08 00:00:00+01')


>>> TGeogPointInst(['Point(10.0 10.0)', '2019-09-08 00:00:00+01'])
>>> TGeogPointInst(Point(10.0, 10.0), parse('2019-09-08 00:00:00+01'))
>>> TGeogPointInst([Point(10.0, 10.0), parse('2019-09-08 00:00:00+01')])

class mobilitydb.main.TGeogPointInstSet(*argv, **kwargs)


Bases: mobilitydb.main.tpoint.TPointInstSet, mobilitydb.main.tpoint.
TGeogPoint
Class for representing temporal geometric points of instant set subtype.
TGeogPointInstSet objects can be created with a single argument of type string as in MobilityDB.

>>> TGeogPointInstSet('Point(10.0 10.0)@2019-09-01')

Another possibility is to give a tuple or list of arguments specifying the composing instants, which can be
instances of str or TGeogPointInst.

>>> TGeogPointInstSet('Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01')

>>> TGeogPointInstSet(TGeogPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeogPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeogPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01'))

>>> TGeogPointInstSet(['Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01'])

>>> TGeogPointInstSet([TGeogPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeogPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeogPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01')])

ComponentClass
alias of TGeogPointInst
class mobilitydb.main.TGeogPointSeq(instantList, lower_inc=None, upper_inc=None, in-
terp=None, srid=None)
Bases: mobilitydb.main.tpoint.TPointSeq, mobilitydb.main.tpoint.TGeogPoint
Class for representing temporal geographic points of sequence subtype.
TGeogPointSeq objects can be created with a single argument of type string as in MobilityDB.

>>> TGeogPointSeq('[Point(10.0 10.0)@2019-09-01 00:00:00+01, Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]')

>>> TGeogPointSeq('Interp=Stepwise;[Point(10.0 10.0)@2019-09-01 00:00:00+01,


˓→Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03

˓→00:00:00+01]')

Another possibility is to give the arguments as follows:


• instantList is the list of composing instants, which can be instances of str or TGeogPointInst,
• lower_inc and upper_inc are instances of bool specifying whether the bounds are includive or not,
where by default ‘lower_inc‘ is True and upper_inc is False, and
• interp which is either 'Linear' or 'Stepwise', the former being the default.

3.4. Main Types 31


python-mobilitydb Documentation, Release 0.01

• srid is an integer specifiying the SRID


Some examples are shown next.

>>> TGeogPointSeq(['Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01'])

>>> TGeogPointSeq([TGeogPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeogPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeogPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01')])

>>> TGeogPointSeq(['Point(10.0 10.0)@2019-09-01 00:00:00+01', 'Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01', 'Point(10.0 10.0)@2019-09-03 00:00:00+01'], True,

˓→True, 'Stepwise')

>>> TGeogPointSeq([TGeogPointInst('Point(10.0 10.0)@2019-09-01 00:00:00+01'),


˓→TGeogPointInst('Point(20.0 20.0)@2019-09-02 00:00:00+01'), TGeogPointInst(

˓→'Point(10.0 10.0)@2019-09-03 00:00:00+01')], True, True, 'Stepwise')

ComponentClass
alias of TGeogPointInst
class mobilitydb.main.TGeogPointSeqSet(sequenceList, interp=None, srid=None)
Bases: mobilitydb.main.tpoint.TPointSeqSet, mobilitydb.main.tpoint.TGeogPoint
Class for representing temporal geographic points of sequence subtype.
TGeogPointSeqSet objects can be created with a single argument of type string as in MobilityDB.

>>> TGeogPointSeqSet('{[Point(10.0 10.0)@2019-09-01 00:00:00+01], [Point(20.0 20.


˓→0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]}')

>>> TGeogPointSeqSet('Interp=Stepwise;{[Point(10.0 10.0)@2019-09-01 00:00:00+01],


˓→[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03

˓→00:00:00+01]}')

Another possibility is to give the arguments as follows:


• sequenceList is the list of composing sequences, which can be instances of str or
TGeogPointSeq,
• interp can be 'Linear' or 'Stepwise', the former being the default, and
• srid is an integer specifiying the SRID, if will be 0 by default if not given.
Some examples are shown next.

>>> TGeogPointSeqSet(['[Point(10.0 10.0)@2019-09-01 00:00:00+01]', '[Point(20.0


˓→20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]'])

>>> TGeogPointSeqSet(['[Point(10.0 10.0)@2019-09-01 00:00:00+01]', '[Point(20.0


˓→20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]'],

˓→'Linear')

>>> TGeogPointSeqSet(['Interp=Stepwise;[Point(10.0 10.0)@2019-09-01 00:00:00+01]',


˓→ 'Interp=Stepwise;[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.

˓→0)@2019-09-03 00:00:00+01]'], 'Stepwise')

>>> TGeogPointSeqSet([TGeogPointSeq('[Point(10.0 10.0)@2019-09-01 00:00:00+01]'),


˓→TGeogPointSeq('[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-

˓→09-03 00:00:00+01]')])

>>> TGeogPointSeqSet([TGeogPointSeq('[Point(10.0 10.0)@2019-09-01 00:00:00+01]'),


˓→ TGeogPointSeq('[Point(20.0 20.0)@2019-09-02 00:00:00+01, Point(10.0 10.0)@2019-

˓→09-03 00:00:00+01]')], 'Linear')

>>> TGeogPointSeqSet([TGeogPointSeq('Interp=Stepwise;[Point(10.0 10.0)@2019-09-01


˓→00:00:00+01]'), TGeogPointSeq('Interp=Stepwise;[Point(20.0 20.0)@2019-09-02

˓→00:00:00+01, Point(10.0 10.0)@2019-09-03 00:00:00+01]')], 'Stepwise')

32 Chapter 3. API Reference


python-mobilitydb Documentation, Release 0.01

ComponentClass
alias of TGeogPointSeq

3.4. Main Types 33


python-mobilitydb Documentation, Release 0.01

34 Chapter 3. API Reference


PYTHON MODULE INDEX

m
mobilitydb.boxes, 18
mobilitydb.main, 20
mobilitydb.temporal, 11
mobilitydb.time, 9

35
python-mobilitydb Documentation, Release 0.01

36 Python Module Index


INDEX

B ComponentClass (mobilitydb.main.TIntSeq attribute),


BaseClass (mobilitydb.main.TBool attribute), 20 23
BaseClass (mobilitydb.main.TFloat attribute), 23 ComponentClass (mobilitydb.main.TIntSeqSet at-
BaseClass (mobilitydb.main.TInt attribute), 21 tribute), 23
BaseClass (mobilitydb.main.TText attribute), 26 ComponentClass (mobilitydb.main.TTextInstSet at-
BaseClass (mobilitydb.temporal.Temporal attribute), tribute), 26
11 ComponentClass (mobilitydb.main.TTextSeq at-
BaseClassDiscrete (mobilitydb.temporal.Temporal tribute), 27
attribute), 11 ComponentClass (mobilitydb.main.TTextSeqSet at-
tribute), 27
C ComponentClass (mobilitydb.temporal.Temporal at-
tribute), 12
ComponentClass (mobilitydb.main.TBoolInstSet at-
contains_timestamp() (mobilitydb.time.Period
tribute), 20
method), 9
ComponentClass (mobilitydb.main.TBoolSeq at-
tribute), 21
ComponentClass (mobilitydb.main.TBoolSeqSet at-
D
tribute), 21 duration (mobilitydb.temporal.Temporal attribute), 12
ComponentClass (mobilitydb.main.TFloatInstSet at- duration (mobilitydb.temporal.TInstant attribute), 14
tribute), 24 duration (mobilitydb.temporal.TInstantSet attribute),
ComponentClass (mobilitydb.main.TFloatSeq at- 15
tribute), 25 duration (mobilitydb.temporal.TSequence attribute),
ComponentClass (mobilitydb.main.TFloatSeqSet at- 16
tribute), 25 duration (mobilitydb.temporal.TSequenceSet at-
ComponentClass (mobili- tribute), 17
tydb.main.TGeogPointInstSet attribute), duration (mobilitydb.time.Period attribute), 9
31 duration (mobilitydb.time.PeriodSet attribute), 11
ComponentClass (mobilitydb.main.TGeogPointSeq
attribute), 32 E
ComponentClass (mobili- endInstant (mobilitydb.temporal.Temporal attribute),
tydb.main.TGeogPointSeqSet attribute), 12
32 endInstant (mobilitydb.temporal.TemporalInstants
ComponentClass (mobili- attribute), 13
tydb.main.TGeomPointInstSet attribute), endInstant (mobilitydb.temporal.TInstant attribute),
29 15
ComponentClass (mobilitydb.main.TGeomPointSeq endInstant (mobilitydb.temporal.TSequenceSet at-
attribute), 29 tribute), 17
ComponentClass (mobili- endPeriod (mobilitydb.time.PeriodSet attribute), 11
tydb.main.TGeomPointSeqSet attribute), endSequence (mobilitydb.temporal.TSequence at-
30 tribute), 16
ComponentClass (mobilitydb.main.TIntInstSet endSequence (mobilitydb.temporal.TSequenceSet at-
attribute), 22 tribute), 17

37
python-mobilitydb Documentation, Release 0.01

endTimestamp (mobilitydb.temporal.Temporal at- H


tribute), 13 hasz (mobilitydb.main.TGeogPoint attribute), 30
endTimestamp (mobili- hasz (mobilitydb.main.TGeomPoint attribute), 28
tydb.temporal.TemporalInstants attribute),
14 I
endTimestamp (mobilitydb.temporal.TInstant at-
instantN() (mobilitydb.temporal.Temporal method),
tribute), 15
12
endTimestamp (mobilitydb.temporal.TSequenceSet at-
instantN() (mobilitydb.temporal.TemporalInstants
tribute), 17
method), 13
endTimestamp (mobilitydb.time.PeriodSet attribute),
instantN() (mobilitydb.temporal.TInstant method),
11
15
endTimestamp (mobilitydb.time.TimestampSet at-
instantN() (mobilitydb.temporal.TSequenceSet
tribute), 10
method), 17
endValue (mobilitydb.temporal.Temporal attribute), 12
instants (mobilitydb.temporal.Temporal attribute), 12
endValue (mobilitydb.temporal.TemporalInstants at-
instants (mobilitydb.temporal.TemporalInstants at-
tribute), 13
tribute), 13
endValue (mobilitydb.temporal.TInstant attribute), 14
instants (mobilitydb.temporal.TInstant attribute), 15
endValue (mobilitydb.temporal.TSequenceSet at-
instants (mobilitydb.temporal.TSequenceSet at-
tribute), 16
tribute), 17
interpolation (mobilitydb.main.TFloatSeq at-
G tribute), 25
geodetic (mobilitydb.boxes.STBox attribute), 19 interpolation (mobilitydb.main.TFloatSeqSet at-
getTime (mobilitydb.temporal.Temporal attribute), 12 tribute), 25
getTime (mobilitydb.temporal.TInstant attribute), 14 interpolation (mobilitydb.main.TPointSeq at-
getTime (mobilitydb.temporal.TInstantSet attribute), tribute), 28
15 interpolation (mobilitydb.main.TPointSeqSet at-
getTime (mobilitydb.temporal.TSequence attribute), 16 tribute), 28
getTime (mobilitydb.temporal.TSequenceSet attribute), interpolation() (mobilitydb.main.TBoolSeq class
17 method), 21
getTimestamp (mobilitydb.temporal.TInstant at- interpolation() (mobilitydb.main.TBoolSeqSet
tribute), 14 class method), 21
getValue (mobilitydb.temporal.TInstant attribute), 14 interpolation() (mobilitydb.main.TIntSeq class
getValues (mobilitydb.main.TFloatInst attribute), 24 method), 23
getValues (mobilitydb.main.TFloatInstSet attribute), interpolation() (mobilitydb.main.TIntSeqSet class
24 method), 23
getValues (mobilitydb.main.TFloatSeq attribute), 25 interpolation() (mobilitydb.main.TTextSeq class
getValues (mobilitydb.main.TFloatSeqSet attribute), method), 27
25 interpolation() (mobilitydb.main.TTextSeqSet
getValues (mobilitydb.main.TPointInst attribute), 27 class method), 27
getValues (mobilitydb.main.TPointInstSet attribute), intersectsPeriod() (mobili-
28 tydb.temporal.Temporal method), 13
getValues (mobilitydb.main.TPointSeq attribute), 28 intersectsPeriod() (mobili-
getValues (mobilitydb.main.TPointSeqSet attribute), tydb.temporal.TInstant method), 15
28 intersectsPeriod() (mobili-
getValues (mobilitydb.temporal.Temporal attribute), tydb.temporal.TInstantSet method), 15
12 intersectsPeriod() (mobili-
getValues (mobilitydb.temporal.TemporalInstants at- tydb.temporal.TSequence method), 16
tribute), 13 intersectsPeriod() (mobili-
getValues (mobilitydb.temporal.TInstant attribute), tydb.temporal.TSequenceSet method), 18
14 intersectsPeriodSet() (mobili-
getValues (mobilitydb.temporal.TSequenceSet at- tydb.temporal.Temporal method), 13
tribute), 16 intersectsTimestamp() (mobili-
tydb.temporal.Temporal method), 13

38 Index
python-mobilitydb Documentation, Release 0.01

intersectsTimestamp() (mobili- numTimestamps (mobilitydb.temporal.TInstant at-


tydb.temporal.TInstant method), 15 tribute), 15
intersectsTimestamp() (mobili- numTimestamps (mobilitydb.temporal.TSequenceSet
tydb.temporal.TInstantSet method), 15 attribute), 17
intersectsTimestamp() (mobili- numTimestamps (mobilitydb.time.PeriodSet attribute),
tydb.temporal.TSequence method), 16 11
intersectsTimestamp() (mobili- numTimestamps (mobilitydb.time.TimestampSet at-
tydb.temporal.TSequenceSet method), 18 tribute), 10
intersectsTimestampSet() (mobili-
tydb.temporal.Temporal method), 13 O
overlap() (mobilitydb.time.Period method), 9
L
lower (mobilitydb.time.Period attribute), 9 P
lower_inc (mobilitydb.temporal.TSequence attribute), Period (class in mobilitydb.time), 9
16 period (mobilitydb.temporal.Temporal attribute), 12
lower_inc (mobilitydb.time.Period attribute), 9 period (mobilitydb.temporal.TInstant attribute), 14
period (mobilitydb.temporal.TInstantSet attribute), 15
M period (mobilitydb.temporal.TSequence attribute), 16
maxValue (mobilitydb.temporal.Temporal attribute), 12 period (mobilitydb.temporal.TSequenceSet attribute),
maxValue (mobilitydb.temporal.TemporalInstants at- 17
tribute), 13 period (mobilitydb.time.PeriodSet attribute), 11
maxValue (mobilitydb.temporal.TInstant attribute), 14 period (mobilitydb.time.TimestampSet attribute), 10
maxValue (mobilitydb.temporal.TSequenceSet at- periodN() (mobilitydb.time.PeriodSet method), 11
tribute), 17 periods (mobilitydb.time.PeriodSet attribute), 11
minValue (mobilitydb.temporal.Temporal attribute), 12 PeriodSet (class in mobilitydb.time), 10
minValue (mobilitydb.temporal.TemporalInstants at-
tribute), 13 S
minValue (mobilitydb.temporal.TInstant attribute), 14 sequenceN() (mobilitydb.temporal.TSequence
minValue (mobilitydb.temporal.TSequenceSet at- method), 16
tribute), 17 sequenceN() (mobilitydb.temporal.TSequenceSet
mobilitydb.boxes (module), 18 method), 17
mobilitydb.main (module), 20 sequences (mobilitydb.temporal.TSequence attribute),
mobilitydb.temporal (module), 11 16
mobilitydb.time (module), 9 sequences (mobilitydb.temporal.TSequenceSet at-
tribute), 18
N shift() (mobilitydb.temporal.Temporal method), 13
numInstants (mobilitydb.temporal.Temporal at- shift() (mobilitydb.temporal.TemporalInstants
tribute), 12 method), 14
numInstants (mobilitydb.temporal.TemporalInstants shift() (mobilitydb.temporal.TInstant method), 15
attribute), 13 shift() (mobilitydb.temporal.TSequenceSet method),
numInstants (mobilitydb.temporal.TInstant at- 18
tribute), 14 shift() (mobilitydb.time.Period method), 9
numInstants (mobilitydb.temporal.TSequenceSet at- shift() (mobilitydb.time.PeriodSet method), 11
tribute), 17 shift() (mobilitydb.time.TimestampSet method), 10
numPeriods (mobilitydb.time.PeriodSet attribute), 11 srid (mobilitydb.boxes.STBox attribute), 19
numSequences (mobilitydb.temporal.TSequence at- srid (mobilitydb.main.TGeogPoint attribute), 30
tribute), 16 srid (mobilitydb.main.TGeomPoint attribute), 28
numSequences (mobilitydb.temporal.TSequenceSet at- startInstant (mobilitydb.temporal.Temporal at-
tribute), 17 tribute), 12
numTimestamps (mobilitydb.temporal.Temporal at- startInstant (mobili-
tribute), 12 tydb.temporal.TemporalInstants attribute),
numTimestamps (mobili- 13
tydb.temporal.TemporalInstants attribute), startInstant (mobilitydb.temporal.TInstant at-
13 tribute), 14

Index 39
python-mobilitydb Documentation, Release 0.01

startInstant (mobilitydb.temporal.TSequenceSet at- TFloatSeqSet (class in mobilitydb.main), 25


tribute), 17 TGeogPoint (class in mobilitydb.main), 30
startPeriod (mobilitydb.time.PeriodSet attribute), 11 TGeogPointInst (class in mobilitydb.main), 30
startSequence (mobilitydb.temporal.TSequence at- TGeogPointInstSet (class in mobilitydb.main), 31
tribute), 16 TGeogPointSeq (class in mobilitydb.main), 31
startSequence (mobilitydb.temporal.TSequenceSet TGeogPointSeqSet (class in mobilitydb.main), 32
attribute), 17 TGeomPoint (class in mobilitydb.main), 28
startTimestamp (mobilitydb.temporal.Temporal at- TGeomPointInst (class in mobilitydb.main), 28
tribute), 12 TGeomPointInstSet (class in mobilitydb.main), 28
startTimestamp (mobili- TGeomPointSeq (class in mobilitydb.main), 29
tydb.temporal.TemporalInstants attribute), TGeomPointSeqSet (class in mobilitydb.main), 30
13 timespan (mobilitydb.temporal.Temporal attribute), 12
startTimestamp (mobilitydb.temporal.TInstant at- timespan (mobilitydb.temporal.TInstant attribute), 14
tribute), 15 timespan (mobilitydb.temporal.TInstantSet attribute),
startTimestamp (mobilitydb.temporal.TSequenceSet 15
attribute), 17 timespan (mobilitydb.temporal.TSequence attribute),
startTimestamp (mobilitydb.time.PeriodSet at- 16
tribute), 11 timespan (mobilitydb.temporal.TSequenceSet at-
startTimestamp (mobilitydb.time.TimestampSet at- tribute), 17
tribute), 10 timespan (mobilitydb.time.PeriodSet attribute), 11
startValue (mobilitydb.temporal.Temporal attribute), timespan (mobilitydb.time.TimestampSet attribute), 10
12 timestampN() (mobilitydb.temporal.Temporal
startValue (mobilitydb.temporal.TemporalInstants method), 13
attribute), 13 timestampN() (mobili-
startValue (mobilitydb.temporal.TInstant attribute), tydb.temporal.TemporalInstants method),
14 14
startValue (mobilitydb.temporal.TSequenceSet at- timestampN() (mobilitydb.temporal.TInstant
tribute), 16 method), 15
STBox (class in mobilitydb.boxes), 18 timestampN() (mobilitydb.temporal.TSequenceSet
method), 17
T timestampN() (mobilitydb.time.PeriodSet method), 11
TBool (class in mobilitydb.main), 20 timestampN() (mobilitydb.time.TimestampSet
TBoolInst (class in mobilitydb.main), 20 method), 10
TBoolInstSet (class in mobilitydb.main), 20 timestamps (mobilitydb.temporal.Temporal attribute),
TBoolSeq (class in mobilitydb.main), 20 13
TBoolSeqSet (class in mobilitydb.main), 21 timestamps (mobilitydb.temporal.TemporalInstants
TBox (class in mobilitydb.boxes), 18 attribute), 14
Temporal (class in mobilitydb.temporal), 11 timestamps (mobilitydb.temporal.TInstant attribute),
TemporalInstants (class in mobilitydb.temporal), 15
13 timestamps (mobilitydb.temporal.TSequenceSet at-
tempSubtype() (mobilitydb.temporal.Temporal class tribute), 17
method), 12 timestamps (mobilitydb.time.PeriodSet attribute), 11
tempSubtype() (mobilitydb.temporal.TInstant class timestamps (mobilitydb.time.TimestampSet attribute),
method), 14 10
tempSubtype() (mobilitydb.temporal.TInstantSet TimestampSet (class in mobilitydb.time), 10
class method), 15 TInstant (class in mobilitydb.temporal), 14
tempSubtype() (mobilitydb.temporal.TSequence TInstantSet (class in mobilitydb.temporal), 15
class method), 16 TInt (class in mobilitydb.main), 21
tempSubtype() (mobilitydb.temporal.TSequenceSet TIntInst (class in mobilitydb.main), 22
class method), 16 TIntInstSet (class in mobilitydb.main), 22
TFloat (class in mobilitydb.main), 23 TIntSeq (class in mobilitydb.main), 22
TFloatInst (class in mobilitydb.main), 23 TIntSeqSet (class in mobilitydb.main), 23
TFloatInstSet (class in mobilitydb.main), 24 tmax (mobilitydb.boxes.STBox attribute), 19
TFloatSeq (class in mobilitydb.main), 24 tmax (mobilitydb.boxes.TBox attribute), 18

40 Index
python-mobilitydb Documentation, Release 0.01

tmin (mobilitydb.boxes.STBox attribute), 19


tmin (mobilitydb.boxes.TBox attribute), 18
TPointInst (class in mobilitydb.main), 27
TPointInstSet (class in mobilitydb.main), 27
TPointSeq (class in mobilitydb.main), 28
TPointSeqSet (class in mobilitydb.main), 28
TSequence (class in mobilitydb.temporal), 15
TSequenceSet (class in mobilitydb.temporal), 16
TText (class in mobilitydb.main), 26
TTextInst (class in mobilitydb.main), 26
TTextInstSet (class in mobilitydb.main), 26
TTextSeq (class in mobilitydb.main), 26
TTextSeqSet (class in mobilitydb.main), 27

U
upper (mobilitydb.time.Period attribute), 9
upper_inc (mobilitydb.temporal.TSequence attribute),
16
upper_inc (mobilitydb.time.Period attribute), 9

V
valueAtTimestamp() (mobili-
tydb.temporal.Temporal method), 12
valueAtTimestamp() (mobili-
tydb.temporal.TInstant method), 14
valueAtTimestamp() (mobili-
tydb.temporal.TInstantSet method), 15
valueAtTimestamp() (mobili-
tydb.temporal.TSequence method), 16
valueAtTimestamp() (mobili-
tydb.temporal.TSequenceSet method), 17
valueRange (mobilitydb.main.TFloat attribute), 23
valueRange (mobilitydb.main.TInt attribute), 21

X
xmax (mobilitydb.boxes.STBox attribute), 19
xmax (mobilitydb.boxes.TBox attribute), 18
xmin (mobilitydb.boxes.STBox attribute), 19
xmin (mobilitydb.boxes.TBox attribute), 18

Y
ymax (mobilitydb.boxes.STBox attribute), 19
ymin (mobilitydb.boxes.STBox attribute), 19

Z
zmax (mobilitydb.boxes.STBox attribute), 19
zmin (mobilitydb.boxes.STBox attribute), 19

Index 41

You might also like