Python Mobilitydb
Python Mobilitydb
Release 0.01
Esteban Zimányi
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
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
1.3 Source
1.3.1 Tests
$ 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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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]")
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]}")
˓→', srid=4326)
THREE
API REFERENCE
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'])
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]'])
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
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.
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.
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.
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?
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.
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?
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.
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.
>>> "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))",
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.
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?
srid
SRID of the geographic coordinates
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')
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.
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.
Another possibility is to give the list of composing sequences, which can be instances of str or TBoolSeq.
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
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.
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.
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.
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.
Another possibility is to give the list of composing sequences, which can be instances of str or TIntSeq.
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')
Another possibility is to give the value and the time arguments, which can be instances of str, float or
datetime.
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.
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.
˓→'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.
˓→'Stepwise')
˓→00:00:00+01]')], 'Stepwise')
ComponentClass
alias of TFloatSeq
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.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')
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)
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.
Another possibility is to give the list of composing sequences, which can be instances of str or TTextSeq.
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.
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.
Another possibility is to give a tuple or list of arguments specifying the composing instants, which can be
instances of str or TGeomPointInst.
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.
˓→00:00:00+01]')
˓→True, 'Stepwise')
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.
˓→00:00:00+01]}')
˓→'Linear')
˓→09-03 00:00:00+01]')])
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.
TGeogPointInst objects can be created with a single argument of type string as in MobilityDB.
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.
Another possibility is to give a tuple or list of arguments specifying the composing instants, which can be
instances of str or TGeogPointInst.
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.
˓→00:00:00+01]')
˓→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.
˓→00:00:00+01]}')
˓→'Linear')
˓→09-03 00:00:00+01]')])
ComponentClass
alias of TGeogPointSeq
m
mobilitydb.boxes, 18
mobilitydb.main, 20
mobilitydb.temporal, 11
mobilitydb.time, 9
35
python-mobilitydb Documentation, Release 0.01
37
python-mobilitydb Documentation, Release 0.01
38 Index
python-mobilitydb Documentation, Release 0.01
Index 39
python-mobilitydb Documentation, Release 0.01
40 Index
python-mobilitydb Documentation, Release 0.01
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