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.
Periodobjects 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:
lowerandupperare instances ofstrordatetimespecifying the bounds,lower_incandupper_incare instances ofboolspecifying whether the bounds are inclusive or not. By default,lower_incisTrueandupper_incisFalse.
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?
-
timespan¶ 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.
TimestampSetobjects 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
strordatetime. 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'))
-
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.
PeriodSetobjects 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
strorPeriod. 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]'))
-
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:
objectAbstract class for representing temporal values of any duration.
-
BaseClass= None¶ Class of the base type, for example,
floatforTFloat
-
BaseClassDiscrete= None¶ Boolean value that states whether the base type is discrete or not, for example,
TrueforintandFalseforfloat
-
ComponentClass= None¶ Class of the components, for example,
TFloatInstfor bothTFloatIandTFloatSeqTFloatSeqforTFloatS.
-
classmethod
duration()¶ Duration 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.
-
getTime¶ Period set 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 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.TemporalInst(value, time=None)¶ Bases:
mobilitydb.temporal.temporal.TemporalAbstract class for representing temporal values of instant duration.
-
classmethod
duration()¶ Duration 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.
-
getTimestamp¶ Timestamp.
-
getTime¶ Period set on which the temporal value is defined.
-
timespan¶ Interval on which the temporal value is defined. It is zero for temporal values of instant duration.
-
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.TemporalInstants¶ Bases:
mobilitydb.temporal.temporal.TemporalAbstract class for representing temporal values of instant set or sequence duration.
-
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.TemporalI(*argv)¶ Bases:
mobilitydb.temporal.temporalinstants.TemporalInstantsAbstract class for representing temporal values of instant set duration.
-
classmethod
duration()¶ Duration of the temporal value, that is,
'InstantSet'.
-
getTime¶ Period set on which the temporal value is defined.
-
timespan¶ Interval on which the temporal value is defined. It is zero for temporal values of instant set duration.
-
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.TemporalSeq(instantList, lower_inc=None, upper_inc=None, interp=None)¶ Bases:
mobilitydb.temporal.temporalinstants.TemporalInstantsAbstract class for representing temporal values of sequence duration.
-
classmethod
duration()¶ Duration of the temporal value, that is,
'Sequence'.
-
lower_inc¶ Is the lower bound inclusive?
-
upper_inc¶ Is the upper bound inclusive?
-
getTime¶ Period set 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.TemporalS(sequenceList, interp=None)¶ Bases:
mobilitydb.temporal.temporal.TemporalAbstract class for representing temporal values of sequence set duration.
-
classmethod
duration()¶ Duration 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.
-
getTime¶ Period set on which the temporal value is defined.
-
timespan¶ Interval on which the period set is defined.
-
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:
objectClass for representing bounding boxes with value (
X) and/or time (T) dimensions.TBoxobjects 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,floatordatetime. 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:
objectClass for representing bounding boxes composed of coordinate and/or time dimensions, where the coordinates may be in 2D (
XandY) 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.STBoxobjects 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,floatanddatetime. 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 theZdimension unless thedimtparameter is given. Finally, thegeodeticparameter 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.TemporalAbstract class for representing temporal Booleans of any duration.
-
class
mobilitydb.main.TBoolInst(value, time=None)¶ Bases:
mobilitydb.temporal.temporalinst.TemporalInst,mobilitydb.main.tbool.TBoolClass for representing temporal Booleans of instant duration.
TBoolInstobjects can be created with a single argument of type string as in MobilityDB.>>> TBoolInst('true@2019-09-01')
Another possibility is to give the
valueand thetimearguments, 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.TBoolI(*argv)¶ Bases:
mobilitydb.temporal.temporali.TemporalI,mobilitydb.main.tbool.TBoolClass for representing temporal Booleans of instant set duration.
TBoolIobjects can be created with a single argument of type string as in MobilityDB.>>> TBoolI('AA@2019-09-01')
Another possibility is to give a tuple or list of arguments, which can be instances of
strorTBoolInst.>>> TBoolI('AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01', 'AA@2019-09-03 00:00:00+01') >>> TBoolI(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')) >>> TBoolI(['AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01', 'AA@2019-09-03 00:00:00+01']) >>> TBoolI([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.temporalseq.TemporalSeq,mobilitydb.main.tbool.TBoolClass for representing temporal Booleans of sequence duration.
TBoolSeqobjects 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.
instantListis the list of composing instants, which can be instances ofstrorTBoolInst,lower_incandupper_incare instances ofboolspecifying whether the bounds are inclusive or not. By defaultlower_incisTrueandupper_incisFalse.
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.TBoolS(sequenceList)¶ Bases:
mobilitydb.temporal.temporals.TemporalS,mobilitydb.main.tbool.TBoolClass for representing temporal Booleans of sequence set duration.
TBoolSobjects can be created with a single argument of type string as in MobilityDB.>>> TBoolS('{[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
strorTBoolSeq.>>> TBoolS(['[true@2019-09-01 00:00:00+01]', '[false@2019-09-02 00:00:00+01, true@2019-09-03 00:00:00+01]']) >>> TBoolS([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]')]) >>> TBoolS([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.TemporalAbstract class for representing temporal integers of any duration.
-
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.temporalinst.TemporalInst,mobilitydb.main.tint.TIntClass for representing temporal integers of instant duration.
TIntInstobjects can be created with a single argument of type string as in MobilityDB.>>> TIntInst('10@2019-09-01')
Another possibility is to give the
valueand thetimearguments, which can be instances ofstr,intordatetime.>>> 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.TIntI(*argv)¶ Bases:
mobilitydb.temporal.temporali.TemporalI,mobilitydb.main.tint.TIntClass for representing temporal integers of instant set duration.
TIntIobjects can be created with a single argument of type string as in MobilityDB.>>> TIntI('10@2019-09-01')
Another possibility is to give a tuple or list of composing instants, which can be instances of
strorTIntInst.>>> TIntI('10@2019-09-01 00:00:00+01', '20@2019-09-02 00:00:00+01', '10@2019-09-03 00:00:00+01') >>> TIntI(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')) >>> TIntI(['10@2019-09-01 00:00:00+01', '20@2019-09-02 00:00:00+01', '10@2019-09-03 00:00:00+01']) >>> TIntI([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.temporalseq.TemporalSeq,mobilitydb.main.tint.TIntClass for representing temporal integers of sequence duration.
TIntSeqobjects 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:
instantListis the list of composing instants, which can be instances ofstrorTIntInst,lower_incandupper_incare instances ofboolspecifying whether the bounds are inclusive or not. By defaultlower_incisTrueandupper_incisFalse.
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.TIntS(sequenceList)¶ Bases:
mobilitydb.temporal.temporals.TemporalS,mobilitydb.main.tint.TIntClass for representing temporal integers of sequence duration.
TIntSobjects can be created with a single argument of type string as in MobilityDB.>>> TIntS('{[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
strorTIntSeq.>>> TIntS(['[10@2019-09-01 00:00:00+01]', '[20@2019-09-02 00:00:00+01, 10@2019-09-03 00:00:00+01]']) >>> TIntS([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]')]) >>> TIntS([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.TemporalAbstract class for representing temporal floats of any duration.
-
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.temporalinst.TemporalInst,mobilitydb.main.tfloat.TFloatClass for representing temporal floats of instant duration.
TFloatInstobjects 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
valueand thetimearguments, which can be instances ofstr,floatordatetime.>>> 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.TFloatI(*argv)¶ Bases:
mobilitydb.temporal.temporali.TemporalI,mobilitydb.main.tfloat.TFloatClass for representing temporal floats of instant set duration.
TFloatIobjects can be created with a single argument of type string as in MobilityDB.>>> TFloatI('10.0@2019-09-01')
Another possibility is to give a tuple or list of composing instants, which can be instances of
strorTFloatInst.>>> TFloatI('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') >>> TFloatI(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')) >>> TFloatI(['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']) >>> TFloatI([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')])
-
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.temporalseq.TemporalSeq,mobilitydb.main.tfloat.TFloatClass for representing temporal floats of sequence duration.
TFloatSeqobjects 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:
instantListis the list of composing instants, which can be instances ofstrorTFloatInst,lower_incandupper_incare instances ofboolspecifying whether the bounds are inclusive or not. By defaultlower_incisTrueandupper_incisFalse.interpwhich 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')
-
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.TFloatS(sequenceList, interp=None)¶ Bases:
mobilitydb.temporal.temporals.TemporalS,mobilitydb.main.tfloat.TFloatClass for representing temporal floats of sequence duration.
TFloatSobjects can be created with a single argument of type string as in MobilityDB.>>> TFloatS('{[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]}') >>> TFloatS('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:
sequenceListis a list of composing sequences, which can be instances ofstrorTFloatSeq,interpcan be'Linear'or'Stepwise', the former being the default.
Some examples are shown next.
>>> TFloatS(['[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]']) >>> TFloatS(['[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') >>> TFloatS(['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') >>> TFloatS([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]')]) >>> TFloatS([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') >>> TFloatS([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.TemporalAbstract class for representing temporal strings of any duration.
-
class
mobilitydb.main.TTextInst(value, time=None)¶ Bases:
mobilitydb.temporal.temporalinst.TemporalInst,mobilitydb.main.ttext.TTextClass for representing temporal strings of instant duration.
TTextInstobjects can be created with a single argument of type string as in MobilityDB.>>> TTextInst('AA@2019-09-01')
Another possibility is to give the
valueand thetimearguments, which can be instances ofstrordatetime.>>> 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.TTextI(*argv)¶ Bases:
mobilitydb.temporal.temporali.TemporalI,mobilitydb.main.ttext.TTextClass for representing temporal strings of instant set duration.
TTextIobjects can be created with a single argument of type string as in MobilityDB.>>> TTextI('AA@2019-09-01')
Another possibility is to give a tuple or list of composing instants, which can be instances of
strorTTextInst.>>> TTextI('AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01', 'AA@2019-09-03 00:00:00+01') >>> TTextI(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')) >>> TTextI(['AA@2019-09-01 00:00:00+01', 'BB@2019-09-02 00:00:00+01', 'AA@2019-09-03 00:00:00+01']) >>> TTextI([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.temporalseq.TemporalSeq,mobilitydb.main.ttext.TTextClass for representing temporal strings of sequence duration.
TTextSeqobjects 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:
instantListis the list of composing instants, which can be instances ofstrorTTextInst,lower_incandupper_incare instances ofboolspecifying whether the bounds are inclusive or not. By defaultlower_incisTrueandupper_incisFalse.
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.TTextS(sequenceList)¶ Bases:
mobilitydb.temporal.temporals.TemporalS,mobilitydb.main.ttext.TTextClass for representing temporal strings of sequence duration.
TTextSobjects can be created with a single argument of typestring as in MobilityDB.>>> TTextS('{[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
strorTTextSeq.>>> TTextS(['[AA@2019-09-01 00:00:00+01]', '[BB@2019-09-02 00:00:00+01, AA@2019-09-03 00:00:00+01]']) >>> TTextS([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]')]) >>> TTextS([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.temporalinst.TemporalInstAbstract class for representing temporal points of instant duration.
-
getValues¶ Geometry representing the values taken by the temporal value.
-
-
class
mobilitydb.main.TPointI(*argv, srid=None)¶ Bases:
mobilitydb.temporal.temporali.TemporalIAbstract class for representing temporal points of instant set duration.
-
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.temporalseq.TemporalSeqAbstract class for representing temporal points of sequence duration.
-
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.TPointS(sequenceList, interp=None, srid=None)¶ Bases:
mobilitydb.temporal.temporals.TemporalSAbstract class for representing temporal points of sequence set duration.
-
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.TemporalAbstract class for representing temporal geometric or geographic points of any duration.
-
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.TGeomPointClass for representing temporal geometric points of instant duration.
TGeomPointInstobjects 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
valueand thetimearguments, which can be instances ofstr,Pointordatetime. 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.TGeomPointI(*argv, **kwargs)¶ Bases:
mobilitydb.main.tpoint.TPointI,mobilitydb.main.tpoint.TGeomPointClass for representing temporal geometric points of instant set duration.
TGeomPointIobjects can be created with a single argument of type string as in MobilityDB.>>> TGeomPointI('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
strorTGeomPointInst.>>> TGeomPointI('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') >>> TGeomPointI(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')) >>> TGeomPointI(['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']) >>> TGeomPointI([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')])
-
class
mobilitydb.main.TGeomPointSeq(instantList, lower_inc=None, upper_inc=None, interp=None, srid=None)¶ Bases:
mobilitydb.main.tpoint.TPointSeq,mobilitydb.main.tpoint.TGeomPointClass for representing temporal geometric points of sequence duration.
TGeomPointSeqobjects 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:
instantListis the list of composing instants, which can be instances ofstrorTGeogPointInst,lower_incandupper_incare instances ofboolspecifying whether the bounds are inclusive or not, where by default ‘lower_inc` isTrueandupper_incisFalse,interpwhich is either'Linear'or'Stepwise', the former being the default, andsridis 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')
-
class
mobilitydb.main.TGeomPointS(sequenceList, interp=None, srid=None)¶ Bases:
mobilitydb.main.tpoint.TPointS,mobilitydb.main.tpoint.TGeomPointClass for representing temporal geometric points of sequence duration.
TGeomPointSobjects can be created with a single argument of type string as in MobilityDB.>>> TGeomPointS('{[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]}') >>> TGeomPointS('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:
sequenceListis the list of composing sequences, which can be instances ofstrorTGeomPointSeq,interpcan be'Linear'or'Stepwise', the former being the default, andsridis an integer specifiying the SRID, if will be 0 by default if not given.
Some examples are shown next.
>>> TGeomPointS(['[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]']) >>> TGeomPointS(['[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') >>> TGeomPointS(['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') >>> TGeomPointS([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]')]) >>> TGeomPointS([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') >>> TGeomPointS([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')
-
class
mobilitydb.main.TGeogPoint¶ Bases:
mobilitydb.temporal.temporal.TemporalAbstract class for representing temporal geographic points of any duration.
-
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.TGeogPointClass for representing temporal geographic points of instant duration.
TGeogPointInstobjects 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
valueand thetimearguments, which can be instances ofstr,Pointordatetime. 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.TGeogPointI(*argv, **kwargs)¶ Bases:
mobilitydb.main.tpoint.TPointI,mobilitydb.main.tpoint.TGeogPointClass for representing temporal geometric points of instant set duration.
TGeogPointIobjects can be created with a single argument of type string as in MobilityDB.>>> TGeogPointI('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
strorTGeogPointInst.>>> TGeogPointI('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') >>> TGeogPointI(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')) >>> TGeogPointI(['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']) >>> TGeogPointI([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')])
-
class
mobilitydb.main.TGeogPointSeq(instantList, lower_inc=None, upper_inc=None, interp=None, srid=None)¶ Bases:
mobilitydb.main.tpoint.TPointSeq,mobilitydb.main.tpoint.TGeogPointClass for representing temporal geographic points of sequence duration.
TGeogPointSeqobjects 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:
instantListis the list of composing instants, which can be instances ofstrorTGeogPointInst,lower_incandupper_incare instances ofboolspecifying whether the bounds are includive or not, where by default ‘lower_inc` isTrueandupper_incisFalse, andinterpwhich is either'Linear'or'Stepwise', the former being the default.sridis 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')
-
class
mobilitydb.main.TGeogPointS(sequenceList, interp=None, srid=None)¶ Bases:
mobilitydb.main.tpoint.TPointS,mobilitydb.main.tpoint.TGeogPointClass for representing temporal geographic points of sequence duration.
TGeogPointSobjects can be created with a single argument of type string as in MobilityDB.>>> TGeogPointS('{[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]}') >>> TGeogPointS('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:
sequenceListis the list of composing sequences, which can be instances ofstrorTGeogPointSeq,interpcan be'Linear'or'Stepwise', the former being the default, andsridis an integer specifiying the SRID, if will be 0 by default if not given.
Some examples are shown next.
>>> TGeogPointS(['[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]']) >>> TGeogPointS(['[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') >>> TGeogPointS(['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') >>> TGeogPointS([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]')]) >>> TGeogPointS([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') >>> TGeogPointS([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')