Database: testData/networktest Restore : no Operator : units Number : 1 Signature: mgpoint -> stream(ugpoint) Example : query units([const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4))(("2007-01-02" "2007-01-03" TRUE TRUE )(1 2 1 0.0 1.0)))]) count; Result : 2 Operator : simplify Number : 1 Signature: mgpoint -> mgpoint Example : query simplify([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))], 0.03); Result : (mgpoint ((("2007-01-01-10:10" "2007-01-01-10:10:02" TRUE FALSE)(1 1 1 0.0 15.0)))) Operator : simplify Number : 2 Signature: mgpoint -> mgpoint Example : query simplify([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))], 0.0); Result : (mgpoint ((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE) (1 1 1 0.0 1.0)) (("2007-01-01-10:10:01" "2007-01-01-10:10:02" TRUE FALSE)(1 1 1 1.0 15.0)))) Operator : passes Number : 1 Signature: mgpoint x gpoint -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gpoint value (1 1 0.3 1)]; Result : TRUE Operator : passes Number : 2 Signature: mgpoint x gpoint -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gpoint value (1 1 3.3 1)]; Result : FALSE Operator : passes Number : 3 Signature: mgpoint x gpoint -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gpoint value (1 1 0.2 1)]; Result : TRUE Operator : passes Number : 4 Signature: mgpoint x gpoint -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gpoint value (1 1 2.4 1)]; Result : TRUE Operator : passes Number : 5 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 2.5 3.0)))]; Result : FALSE Operator : passes Number : 6 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 0.5 2.4)))]; Result : TRUE Operator : passes Number : 7 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 0.1 2.8)))]; Result : TRUE Operator : passes Number : 8 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 0.1 1.4)))]; Result : TRUE Operator : passes Number : 9 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 1.1 2.6)))]; Result : TRUE Operator : passes Number : 10 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 0.5 0.7)))]; Result : TRUE Operator : passes Number : 11 Signature: mgpoint x gline -> bool Example : query [const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))] passes [const gline value (1 ((1 0.0 0.15)))]; Result : FALSE Operator : trajectory Number : 1 Signature: mgpoint -> gline Example : query trajectory([const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))]); Result : (gline(1((1 0.2 2.4)))) Operator : mpoint2mgpoint Number : 1 Signature: network x mpoint -> mgpoint Example : query mpoint2mgpoint(B_NETWORK, [const mpoint value((("2007-01-01-10:02:01.000" "2007-01-01-10:02:03.000" TRUE FALSE)(8209.0 8769.0 8293.0 8768.0)))]); Result : (mgpoint((("2007-01-01-10:02:01" "2007-01-01-10:02:03" TRUE FALSE)(1 1 1 0.0 84.00595217006948)))) Tolerance: 0.01% Operator : mgpoint2mpoint Number : 1 Signature: mgpoint -> mpoint Example : query mgpoint2mpoint([const mgpoint value((("2007-01-01-10:02:01" "2007-01-01-10:02:03" TRUE FALSE) (1 1 1 0.0 84.00595217006948)))]); Result : (mpoint((("2007-01-01-10:02:01" "2007-01-01-10:02:03" TRUE FALSE)(8209.0 8769.0 8293.0 8768.0)))) Tolerance: 0.01% Operator : length Number : 1 Signature: mgpoint -> real Example : query length([const mgpoint value( (("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4)))]); Result : 2.2 Tolerance: 0.01% Operator : length Number : 2 Signature: ugpoint -> real Example : query length([const ugpoint value(("2007-01-01" "2007-01-02" TRUE FALSE)(1 1 1 0.2 2.4))]); Result : 2.2 Tolerance: 0.01% Operator : atinstant Number : 1 Signature: mgpoint x instant -> igpoint Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]) atinstant create_instant(2555.42362); Result : (igpoint("2007-01-01-10:10:00.768" (1 1 0.7679999864841811 1))) Tolerance: 0.01% Operator : initial Number : 1 Signature: mgpoint x instant -> igpoint Example : query initial([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]); Result : (igpoint("2007-01-01-10:10" (1 1 0.0 1))) Tolerance: 0.01% Operator : final Number : 1 Signature: mgpoint x instant -> igpoint Example : query final([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]); Result : (igpoint("2007-01-01-10:10:02" (1 1 15.0 1))) Tolerance: 0.01% Operator : at Number : 1 Signature: mpoint x gpoint -> mgpoint Example : query [const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))] at [const gpoint value (1 1 0.0 1)]; Result : (mgpoint((("2007-01-01-10:10" "2007-01-01-10:10" TRUE TRUE)(1 1 1 0.0 0.0)))) Tolerance: 0.01% Operator : at Number : 2 Signature: mpoint x gline -> mgpoint Example : query [const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))] at [const gline value (1 ((1 0.0 1.0)))]; Result : (mgpoint((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01" "2007-01-01-10:10:01" TRUE TRUE)(1 1 1 1.0 1.0)))) Tolerance: 0.01% Operator : inside Number : 1 Signature: mgpoint x gline -> mgpoint Example : query [const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))] inside [const gline value (1 ((1 0.0 1.0)))]; Result : (mbool((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE TRUE) TRUE)(("2007-01-01-10:10:01" "2007-01-01-10:10:02" FALSE TRUE)FALSE))) Tolerance: 0.01% Operator : val Number : 1 Signature: igpoint -> gpoint Example : query val([const igpoint value( "2007-01-01-10:10:02" (1 1 15.0 1))]); Result : (gpoint(1 1 15.0 1)) Tolerance: 0.01% Operator : inst Number : 1 Signature: igpoint -> instant Example : query inst([const igpoint value( "2007-01-01-10:10:02" (1 1 15.0 1))]); Result : (instant "2007-01-01-10:10:02") Tolerance: 0.01% Operator : atperiods Number : 1 Signature: mgpoint x periods -> mgpoint Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]) atperiods [const periods value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE TRUE))]; Result : (mgpoint ((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE) (1 1 1 0.0 1.0)) (("2007-01-01-10:10:01" "2007-01-01-10:10:01" TRUE TRUE)(1 1 1 1.0 1.000000216748216)))) Tolerance: 0.01% Operator : present Number : 1 Signature: mgpoint x periods -> bool Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]) present [const periods value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE TRUE))]; Result : TRUE Operator : present Number : 2 Signature: mgpoint x periods -> bool Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]) present [const periods value (("2008-01-01-10:10:00.000" "2008-01-01-10:10:01.000" TRUE TRUE))]; Result : FALSE Operator : present Number : 3 Signature: mgpoint x instant -> bool Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]) present create_instant(2555.42362); Result : TRUE Operator : present Number : 4 Signature: mgpoint x instant -> bool Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]) present create_instant(2450.42362); Result : FALSE Operator : isempty Number : 1 Signature: mgpoint -> bool Example : query isempty([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]); Result : FALSE Operator : isempty Number : 2 Signature: mgpoint -> bool Example : query isempty([const mgpoint value()]); Result : TRUE Operator : no_components Number : 1 Signature: mgpoint -> int Example : query no_components([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]); Result : 2 Operator : no_components Number : 2 Signature: mgpoint -> int Example : query no_components([const mgpoint value()]); Result : 0 Operator : intersection Number : 1 Signature: mgpoint x mgpoint -> mgpoint Example : query intersection([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))],[const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]); Result : (mgpoint((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01" "2007-01-01-10:10:02" TRUE TRUE)(1 1 1 1.0 15.0)))) Tolerance: 0.01% Operator : intersects Number : 1 Signature: mgpoint x mgpoint -> bool Example : query [const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))] intersects [const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]; Result : TRUE Operator : deftime Number : 1 Signature: mgpoint -> periods Example : query deftime([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE TRUE)(1 1 1 1.0 15.0)))]); Result : (periods (("2007-01-01-10:10" "2007-01-01-10:10:02" TRUE TRUE))) Operator : deftime Number : 2 Signature: mgpoint -> periods Example : query deftime([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0)))]); Result : (periods (("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE))) Operator : deftime Number : 3 Signature: ugpoint -> periods Example : query deftime([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : (periods (("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE))) Operator : unitrid Number : 1 Signature: ugpoint -> real Example : query unitrid([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : 1.0 Tolerance: 0.01% Operator : unitstartpos Number : 1 Signature: ugpoint -> real Example : query unitstartpos([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : 0.2 Tolerance: 0.01% Operator : unitendpos Number : 1 Signature: ugpoint -> real Example : query unitendpos([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : 1.5 Tolerance: 0.01% Operator : unitstarttime Number : 1 Signature: ugpoint -> real Example : query unitstarttime([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : 2555.4236111111 Tolerance: 0.01% Operator : unitendtime Number : 1 Signature: ugpoint -> real Example : query unitendtime([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : 2555.4236226852 Tolerance: 0.01% Operator : unitbox Number : 1 Signature: ugpoint -> rect3 Example : query unitbox([const ugpoint value (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : (rect3(1.0 1.0 0.2 1.5 2555.4236111111 2555.4236226852)) Tolerance: 0.01% Operator : unitbox2 Number : 1 Signature: ugpoint -> rect Example : query unitbox2([const ugpoint value( ("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.2 1.5))]); Result : (rect(1.0 1.0 0.2 1.5)) Tolerance: 0.01% Operator : distance Number : 1 Signature: mgpoint x mgpoint -> mreal Example : query distance([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE FALSE)(1 1 1 1.0 15.0)))],[const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE FALSE)(1 1 1 1.0 15.0)))]); Result : (mreal((("2007-01-01-10:10" "2007-01-01-10:10:02" TRUE FALSE)(0.0 0.0 0.0 FALSE)))) Tolerance: 0.01% Operator : unitboundingbox Number : 1 Signature: ugpoint -> rect3 Example : query unitboundingbox([const ugpoint value( ("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 84.00595217006948))]); Result : (rect3(8209.0 8293.0 8768.0 8769.0 2555.4236111111 2555.4236226852)) Tolerance: 0.01% Operator : mgpbbox Number : 1 Signature: mgpoint -> rect3 Example : query mgpbbox([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 84.00595217006948)))]); Result : (rect3(8209.0 8293.0 8768.0 8769.0 2555.4236111111 2555.4236226852)) Tolerance: 0.01% Operator : union Number : 1 Signature: mgpoint x mgpoint -> mgpoint Example : query ([const mgpoint value( (("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:01.000" "2007-01-01-10:10:02.000" TRUE FALSE)(1 1 1 1.0 15.0)))]) union ([const mgpoint value( (("2007-01-01-10:10:05.000" "2007-01-01-10:10:06.000" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:06.000" "2007-01-01-10:10:07.000" TRUE FALSE)(1 1 1 1.0 15.0)))]); Result : (mgpoint((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE) (1 1 1 0.0 1.0)) (("2007-01-01-10:10:01" "2007-01-01-10:10:02" TRUE FALSE)(1 1 1 1.0 15.0))(("2007-01-01-10:10:05" "2007-01-01-10:10:06" TRUE FALSE)(1 1 1 0.0 1.0))(("2007-01-01-10:10:06" "2007-01-01-10:10:07" TRUE FALSE)(1 1 1 1.0 15.0)))) Tolerance: 0.01% Operator : startunitinst Number : 1 Signature: ugpoint -> instant Example : query startunitinst([const ugpoint value( ("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 84.00595217006948))]); Result : (instant "2007-01-01-10:10") Tolerance: 0.01% Operator : endunitinst Number : 1 Signature: ugpoint -> instant Example : query endunitinst([const ugpoint value( ("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 84.00595217006948))]); Result : (instant "2007-01-01-10:10:01") Tolerance: 0.01% Operator : ugpoint2mgpoint Number : 1 Signature: ugpoint -> mgpoint Example : query ugpoint2mgpoint([const ugpoint value( ("2007-01-01-10:10:00.000" "2007-01-01-10:10:01.000" TRUE FALSE)(1 1 1 0.0 84.00595217006948))]); Result : (mgpoint((("2007-01-01-10:10" "2007-01-01-10:10:01" TRUE FALSE) (1 1 1 0.0 84.00595217006948)))) Tolerance: 0.01% Operator : mgp2mgpsecunits Number : 1 Signature: rel(tuple((ai xi))) x ai x network x real -> stream(mgpsecunit) Example : query trains mgp2mgpsecunits [Trip, B_NETWORK, 20000.0] transformstream consume; Result : file Operator : mgp2mgpsecunits2 Number : 1 Signature: mgpoint x real -> stream(mgpsecunit) Example : query trains feed addid projectextendstream[TID; MGPSec: mgp2mgpsecunits2(.Trip, 20000.0)] consume; Result : file Operator : mgp2mgpsecunits3 Number : 1 Signature: stream(mgpoint) -> stream(mgpsecunit) Example : query trains feed projecttransformstream [Trip] mgp2mgpsecunits3 [20000.0] transformstream consume; Result : file Operator : mgpsu2tuple Number : 1 Signature: stream(mgpsecunit) -> stream(tuple((Secid int)(PartNo int)(Dir int)(Speed real)(Starttime instant)(Endtime instant)(Leftclosed bool)(Rightclosed bool))) Example : query trains feed projecttransformstream [Trip] mgp2mgpsecunits3[20000.0] mgpsu2tuple consume; Result : file