API Reference¶
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
andupper
are instances ofstr
ordatetime
specifying the bounds,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are inclusive or not. By default,lower_inc
isTrue
andupper_inc
isFalse
.
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?
-
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
ordatetime
. 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
orPeriod
. 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]')]) >>> 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
-
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
forTFloat
-
BaseClassDiscrete
= None¶ Boolean value that states whether the base type is discrete or not, for example,
True
forint
andFalse
forfloat
-
ComponentClass
= None¶ Class of the components, for example,
TFloatInst
for bothTFloatI
andTFloatSeq
TFloatSeq
forTFloatS
.
-
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?
-
classmethod
-
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?
-
classmethod
-
class
mobilitydb.temporal.
TSequence
(instantList, lower_inc=None, upper_inc=None, interp=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?
-
classmethod
-
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.
-
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?
-
classmethod
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 ofstr
,float
ordatetime
. 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
andY
) or in 3D (X
,Y
, andZ
). 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 ((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 ofstr
,float
anddatetime
. 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 theZ
dimension unless thedimt
parameter is given. Finally, thegeodetic
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?
-
srid
¶ SRID of the geographic coordinates
-
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 thetime
arguments, which can be instances ofstr
,bool
, ordatetime
.>>> 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
orTBoolInst
.>>> 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')])
-
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.>>> 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 ofstr
orTBoolInst
,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are inclusive or not. By defaultlower_inc
isTrue
andupper_inc
isFalse
.
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)
-
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
orTBoolSeq
.>>> 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]')])
-
classmethod
interpolation
()¶ Interpolation of the temporal value, that is,
'Stepwise'
.
-
classmethod
-
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 thetime
arguments, which can be instances ofstr
,int
ordatetime
.>>> 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
orTIntInst
.>>> 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')])
-
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 ofstr
orTIntInst
,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are inclusive or not. By defaultlower_inc
isTrue
andupper_inc
isFalse
.
Some examples are given next.
>>> 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)
-
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
orTIntSeq
.>>> 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]')])
-
classmethod
interpolation
()¶ Interpolation of the temporal value, that is,
'Stepwise'
.
-
classmethod
-
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 thetime
arguments, which can be instances ofstr
,float
ordatetime
.>>> 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
orTFloatInst
.>>> 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 ofstr
orTFloatInst
,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are inclusive or not. By defaultlower_inc
isTrue
andupper_inc
isFalse
.interp
which is either'Linear'
or'Stepwise'
, the former being the default.
Some examples are shown next.
>>> 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 ofstr
orTFloatSeq
,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')
-
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 thetime
arguments, which can be instances ofstr
ordatetime
.>>> 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
orTTextInst
.>>> 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')])
-
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]')
Another possibility is to give the arguments as follows:
instantList
is the list of composing instants, which can be instances ofstr
orTTextInst
,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are inclusive or not. By defaultlower_inc
isTrue
andupper_inc
isFalse
.
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)
-
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
orTTextSeq
.>>> 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]')])
-
classmethod
interpolation
()¶ Interpolation of the temporal value, that is,
'Stepwise'
.
-
classmethod
-
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.
-
-
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 thetime
arguments, which can be instances ofstr
,Point
ordatetime
. 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
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
orTGeomPointInst
.>>> 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, interp=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 ofstr
orTGeogPointInst
,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are inclusive or not, where by default ‘lower_inc` isTrue
andupper_inc
isFalse
,interp
which is either'Linear'
or'Stepwise'
, the former being the default, andsrid
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')
-
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 ofstr
orTGeomPointSeq
,interp
can be'Linear'
or'Stepwise'
, the former being the default, andsrid
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.
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 thetime
arguments, which can be instances ofstr
,Point
ordatetime
. 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
orTGeogPointInst
.>>> 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, interp=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 ofstr
orTGeogPointInst
,lower_inc
andupper_inc
are instances ofbool
specifying whether the bounds are includive or not, where by default ‘lower_inc` isTrue
andupper_inc
isFalse
, andinterp
which is either'Linear'
or'Stepwise'
, the former being the default.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 ofstr
orTGeogPointSeq
,interp
can be'Linear'
or'Stepwise'
, the former being the default, andsrid
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')
-
ComponentClass
¶ alias of
TGeogPointSeq