798 lines
23 KiB
Plaintext
798 lines
23 KiB
Plaintext
#This file is part of SECONDO.
|
|
#
|
|
#Copyright (C) 2004, University in Hagen, Department of Computer Science,
|
|
#Database Systems for New Applications.
|
|
#
|
|
#SECONDO is free software; you can redistribute it and/or modify
|
|
#it under the terms of the GNU General Public License as published by
|
|
#the Free Software Foundation; either version 2 of the License, or
|
|
#(at your option) any later version.
|
|
#
|
|
#SECONDO is distributed in the hope that it will be useful,
|
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
#GNU General Public License for more details.
|
|
#
|
|
#You should have received a copy of the GNU General Public License
|
|
#along with SECONDO; if not, write to the Free Software
|
|
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
# a test for the spatial algebra
|
|
# run with : TestRunner -c SecondoConfig.ini < hierarchicalgeo.test
|
|
|
|
# A fresh restored berlin database needs to be present for
|
|
# this test
|
|
|
|
|
|
#setup hierarchicalgeotest
|
|
|
|
open database hiergeo
|
|
|
|
|
|
|
|
# The conventions for commands are the same as in SecondoTTYBDB
|
|
# make sure that commands are always terminated
|
|
# (either by a semicolon or by a newline)
|
|
|
|
# a TESTCASE consists of a TESTCASE declarative followed
|
|
# by a YIELDS declarative followed by a command.
|
|
# multiple or no commands after a YIELD directive
|
|
# will confuse the TestRunner
|
|
|
|
# the expected output specified by the YIELD declarative
|
|
# is converted to a ListExpr and the TestRunner compares
|
|
# it to Secondo's actual output by calling
|
|
# NestedList->Equal
|
|
|
|
|
|
|
|
# 1 - Tests about the datatype CUPoint (uncertain unit point)
|
|
|
|
|
|
#testcase createcupoint
|
|
#yields success
|
|
create cuptest1 : cupoint;
|
|
|
|
|
|
#textcase updatecupoint
|
|
#yields success
|
|
update cuptest1 := [const cupoint value(23.4 (
|
|
("2003-11-20-07:01:44.586" "2003-11-20-07:01:50" TRUE FALSE)
|
|
(-3544.0 14312.0 -3560.0 14235.0)))];
|
|
|
|
|
|
#testcase letcupoint
|
|
#yields success
|
|
let cuptest2 = [const cupoint value (44.5 (
|
|
("2003-11-20-07:01:50" "2003-11-20-07:02" TRUE FALSE)
|
|
(-3560.0 14235.0 -3560.0 14235.0)))];
|
|
|
|
|
|
#testcase querycupoint
|
|
#yields (cupoint (23.4 (\
|
|
("2003-11-20-07:01:44.586" "2003-11-20-07:01:50" TRUE FALSE)\
|
|
(-3544.0 14312.0 -3560.0 14235.0))) )
|
|
query cuptest1;
|
|
|
|
|
|
#testcase queryepsiloncupoint
|
|
#yields (real 44.5)
|
|
query epsilon(cuptest2);
|
|
|
|
|
|
# tolerance_real 0.001
|
|
|
|
|
|
#testcase querytrajectorycupoint
|
|
#yields (region ( (( \
|
|
(-3579.495201296701 14222.05793191174)\
|
|
(-3582.966554333648 14230.51698962308)\
|
|
(-3582.910614118539 14239.76064708957)\
|
|
(-3566.910614118539 14316.76064708957)\
|
|
(-3563.515976039345 14324.9107195474)\
|
|
(-3557.078363311038 14331.40403084682)\
|
|
(-3548.643838866155 14334.9345756574)\
|
|
(-3539.500255036609 14334.9632814568)\
|
|
(-3531.043729153482 14331.48576520826)\
|
|
(-3524.565472908629 14325.03300259859)\
|
|
(-3521.054639569219 14316.59025431774)\
|
|
(-3521.047291948592 14307.44662838033)\
|
|
(-3521.089385881461 14307.23935291043)\
|
|
(-3537.089385881461 14230.23935291043)\
|
|
(-3540.544551941697 14221.9982485468)\
|
|
(-3547.01242922497 14215.5350827034)\
|
|
(-3555.463355276174 14212.04397999108)\
|
|
(-3564.606973431696 14212.05799058932)\
|
|
(-3573.047161119282 14215.57497524513))) ))
|
|
query trajectory( cuptest1);
|
|
|
|
|
|
#testcase queryd_passescupoint1
|
|
#yields (bool FALSE)
|
|
query cupmehring1 d_passes mehringdamm;
|
|
|
|
|
|
#testcase queryd_passescupoint2
|
|
#yields (bool TRUE)
|
|
query cupmehring d_passes mehringdamm;
|
|
|
|
|
|
#testcase queryd_passescupoint3
|
|
#yields (bool TRUE)
|
|
query cupinhavel d_passes havel;
|
|
|
|
|
|
#testcase queryd_passescupoint4
|
|
#yields (bool TRUE)
|
|
query cupkarpfenteich d_passes karpfenteich;
|
|
|
|
|
|
#testcase queryd_passescupoint5
|
|
#yields (bool TRUE)
|
|
query cupkarpfenteich2 d_passes karpfenteich;
|
|
|
|
|
|
#testcase queryd_passescupoint6
|
|
#yields (bool FALSE)
|
|
query cupkarpfenteich3 d_passes karpfenteich;
|
|
|
|
|
|
#testcase queryd_passescupoint7
|
|
#yields (bool FALSE)
|
|
query cupouthavel d_passes havel;
|
|
|
|
|
|
#testcase queryd_passescupoint8
|
|
#yields (bool FALSE)
|
|
query cuppointhavel d_passes havel;
|
|
|
|
|
|
#testcase queryd_passescupoint9
|
|
#yields (bool TRUE)
|
|
query cuppointinhavel d_passes havel;
|
|
|
|
|
|
#testcase queryd_passescupoint10
|
|
#yields (bool TRUE)
|
|
query cupthroughhavel d_passes havel;
|
|
|
|
|
|
#testcase queryp_passescupoint1
|
|
#yields (bool TRUE)
|
|
query cupinhavel p_passes havel;
|
|
|
|
|
|
#testcase queryp_passescupoint2
|
|
#yields (bool TRUE)
|
|
query cupkarpfenteich p_passes karpfenteich;
|
|
|
|
|
|
#testcase queryp_passescupoint3
|
|
#yields (bool TRUE)
|
|
query cupkarpfenteich2 p_passes karpfenteich;
|
|
|
|
|
|
#testcase queryp_passescupoint4
|
|
#yields (bool TRUE)
|
|
query cupkarpfenteich3 p_passes karpfenteich;
|
|
|
|
|
|
#testcase queryp_passescupoint5
|
|
#yields (bool TRUE)
|
|
query cupmehring p_passes mehringdamm;
|
|
|
|
|
|
#testcase queryp_passescupoint6
|
|
#yields (bool TRUE)
|
|
query cupmehring1 p_passes mehringdamm;
|
|
|
|
|
|
#testcase queryp_passescupoint7
|
|
#yields (bool TRUE)
|
|
query cupouthavel p_passes havel;
|
|
|
|
|
|
#testcase queryp_passescupoint8
|
|
#yields (bool TRUE)
|
|
query cuppointhavel p_passes havel;
|
|
|
|
|
|
#testcase queryp_passescupoint9
|
|
#yields (bool TRUE)
|
|
query cuppointinhavel p_passes havel;
|
|
|
|
|
|
#testcase queryp_passescupoint10
|
|
#yields (bool TRUE)
|
|
query cupthroughhavel p_passes havel;
|
|
|
|
|
|
#testcase queryd_atcupoint1
|
|
#yields (cupoint (0.0 (\
|
|
("2003-11-20-06:28" "2003-11-20-06:28" TRUE TRUE) \
|
|
(9396.0 9871.0 9396.0 9871.0))) )
|
|
query cupmehring d_at mehringdamm;
|
|
|
|
|
|
#testcase queryd_atcupoint2
|
|
#yields ( cupoint undef )
|
|
query cupmehring1 d_at mehringdamm;
|
|
|
|
|
|
#testcase queryp_atcupoint1
|
|
#yields ( cmpoint ( (32.4 (\
|
|
("2003-11-20-07:00:37.844" "2003-11-20-07:00:43.127" TRUE TRUE)\
|
|
(-2849.0 14461.0 -2922.882209401275 14477.51484680734)))) )
|
|
query cuphavel p_at havel;
|
|
|
|
|
|
#testcase queryp_atcupoint
|
|
#yields ( cupoint (0.1 (\
|
|
("2003-11-20-06:28" "2003-11-20-06:28:00.015" TRUE TRUE)\
|
|
(9396.0 9871.0 9396.029162576093 9871.095653249582))) )
|
|
query cupmehring1 p_at mehringdamm;
|
|
|
|
|
|
#testcase deletecupoint
|
|
#yields success
|
|
delete cuptest1;
|
|
|
|
|
|
# 2 - Tests about the datatype cmpoint (uncertain moving point)
|
|
|
|
|
|
#testcase cmpoint_no_components
|
|
#yields (int 185)
|
|
query no_components(ctrain7);
|
|
|
|
|
|
#testcase cmpoint_epsilon
|
|
#yields (real 23.5)
|
|
query epsilon(ctrain7);
|
|
|
|
|
|
#testcase createcmpoint
|
|
#yields success
|
|
create cmptest1 : cmpoint;
|
|
|
|
|
|
#testcase updatecmpoint
|
|
#yields success
|
|
update cmptest1 := [const cmpoint value((34.5 (
|
|
("2003-11-20-07:01:38.530" "2003-11-20-07:01:44.586" TRUE FALSE)
|
|
(-3512.0 14394.0 -3544.0 14312.0)))
|
|
(23.4 (
|
|
("2003-11-20-07:01:44.586" "2003-11-20-07:01:50" TRUE FALSE)
|
|
(-3544.0 14312.0 -3560.0 14235.0)))
|
|
(44.5 (
|
|
("2003-11-20-07:01:50" "2003-11-20-07:02" TRUE FALSE)
|
|
(-3560.0 14235.0 -3560.0 14235.0))))];
|
|
|
|
|
|
#testcase letcmpoint
|
|
#yields success
|
|
let cmptest2 = [const cmpoint value((22.25 (
|
|
("2003-11-20-07:01:38.530" "2003-11-20-07:01:44.586" TRUE FALSE)
|
|
(-3412.0 14394.0 -3444.0 14312.0)))
|
|
(12.3 (
|
|
("2003-11-20-07:01:44.586" "2003-11-20-07:01:50" TRUE FALSE)
|
|
(-3444.0 14312.0 -3460.0 14235.0)))
|
|
(15.0 (
|
|
("2003-11-20-07:01:50" "2003-11-20-07:02" TRUE FALSE)
|
|
(-3460.0 14235.0 -3460.0 14235.0))))];
|
|
|
|
|
|
#testcase querycmptest
|
|
#yields (cmpoint ( (34.5 (\
|
|
("2003-11-20-07:01:38.530" "2003-11-20-07:01:44.586" TRUE FALSE)\
|
|
(-3512.0 14394.0 -3544.0 14312.0)))\
|
|
(23.4 (\
|
|
("2003-11-20-07:01:44.586" "2003-11-20-07:01:50" TRUE FALSE)\
|
|
(-3544.0 14312.0 -3560.0 14235.0)))\
|
|
(44.5 (\
|
|
("2003-11-20-07:01:50" "2003-11-20-07:02" TRUE FALSE)\
|
|
(-3560.0 14235.0 -3560.0 14235.0)))) )
|
|
query cmptest1;
|
|
|
|
|
|
#testcase querydeftime
|
|
#yields (periods ( ("2003-11-20-07:01:38.530" "2003-11-20-07:02" TRUE FALSE) ) )
|
|
query deftime (cmptest1);
|
|
|
|
|
|
#testcase queryepsiloncmpoint
|
|
#yields (real 44.5)
|
|
query epsilon(cmptest1);
|
|
|
|
|
|
#testcase querycmptestpresent1
|
|
#yields (bool TRUE )
|
|
query cmptest1 present ( [const instant value"2003-11-20-07:01:45"] );
|
|
|
|
|
|
#testcase querycmptestpresent2
|
|
#yields (bool FALSE )
|
|
query cmptest1 present ( [const instant value"2003-11-21-07:01:45"] );
|
|
|
|
|
|
#testcase querycmptestatinstant
|
|
#yields (intimeregion ("2003-11-20-07:01:45" ( ( (\
|
|
(-3566.794913800979 14297.04364246868)\
|
|
(-3568.623239292142 14306.00261423832)\
|
|
(-3566.878699957451 14314.9782775442)\
|
|
(-3561.827666362905 14322.60015453728)\
|
|
(-3554.241371722162 14327.70447456003)\
|
|
(-3545.278153687511 14329.51186819015)\
|
|
(-3536.306589861971 14327.74636775256)\
|
|
(-3528.696532152325 14322.67754432629)\
|
|
(-3523.609946551014 14315.07934742233)\
|
|
(-3521.823494643517 14306.11193202808)\
|
|
(-3523.527104730926 14297.34684989721)\
|
|
(-3528.542476080384 14289.70145916175)\
|
|
(-3536.104842082074 14284.56175394381)\
|
|
(-3545.059518704463 14282.71250656736)\
|
|
(-3554.039232517375 14284.43607528055)\
|
|
(-3561.672887207145 14289.46929148375))))))
|
|
query cmptest1 atinstant( [const instant value"2003-11-20-07:01:45"] );
|
|
|
|
|
|
#testcase querycmpatperiods
|
|
#yields (cmpoint ( (23.4 (\
|
|
("2003-11-20-07:01:46" "2003-11-20-07:01:50" TRUE FALSE)\
|
|
(-3548.178795714814 14291.88954562246 -3560.0 14235.0)))\
|
|
(44.5 (\
|
|
("2003-11-20-07:01:50" "2003-11-20-07:01:53" TRUE FALSE)\
|
|
(-3560.0 14235.0 -3560.0 14235.0)))) )
|
|
query cmptest atperiods ([const periods value(("2003-11-20-07:01:46" "2003-11-20-07:01:53" TRUE FALSE))]);
|
|
|
|
|
|
#testcase querycmpd_passes1
|
|
#yields (bool TRUE )
|
|
query cmphavel d_passes havel;
|
|
|
|
|
|
#testcase querycmpd_passes2
|
|
#yields (bool TRUE )
|
|
query cmpmehringd d_passes mehringdamm;
|
|
|
|
#testcase querycmpp_passes1
|
|
#yields (bool TRUE )
|
|
query cmphavel p_passes havel;
|
|
|
|
|
|
#testcase querycmpp_passes2
|
|
#yields (bool TRUE )
|
|
query cmpmehringd p_passes mehringdamm;
|
|
|
|
#testcase querycmpunits1
|
|
#yields (int 3 )
|
|
query units(cmptest) count;
|
|
|
|
|
|
#testcase queryd_atcmpoint1
|
|
#yields (cmpoint ( (23.5 (\
|
|
("2003-11-20-07:00:37.320" "2003-11-20-07:00:37.844" TRUE FALSE)\
|
|
(-2841.495125236518 14460.93238851565 -2849.0 14461.0)))\
|
|
(23.5 (\
|
|
("2003-11-20-07:00:37.844" "2003-11-20-07:00:39.212" TRUE TRUE)\
|
|
(-2849.0 14461.0 -2868.139322458532 14465.27820149073)))) )
|
|
query ctrain7 d_at havel;
|
|
|
|
|
|
#testcase queryp_atcmpoint1
|
|
#yields ( cmpoint ( (23.5 (\
|
|
("2003-11-20-06:27:48.477" "2003-11-20-06:27:50" TRUE FALSE)\
|
|
(9388.648889508975 9848.679355418162 9396.0 9871.0)))\
|
|
(23.5 (\
|
|
("2003-11-20-06:27:50" "2003-11-20-06:28" TRUE FALSE)\
|
|
(9396.0 9871.0 9396.0 9871.0)))\
|
|
(23.5 (\
|
|
("2003-11-20-06:28" "2003-11-20-06:28:03.560" TRUE TRUE)\
|
|
(9396.0 9871.0 9402.853205381663 9893.478513651857)))) )
|
|
query ctrain7 p_at mehringdamm;
|
|
|
|
#testcase queryp_atcmpoint2
|
|
#yields ( cmpoint ( (23.5 (\
|
|
("2003-11-20-07:00:34.013" "2003-11-20-07:00:37.844" TRUE FALSE)\
|
|
(-2794.094843967178 14460.50535895466 -2849.0 14461.0)))\
|
|
(23.5 (\
|
|
("2003-11-20-07:00:37.844" "2003-11-20-07:00:42.503" TRUE TRUE)\
|
|
(-2849.0 14461.0 -2914.166436703772 14475.56661526319)))) )
|
|
query ctrain7 p_at havel;
|
|
|
|
|
|
#testcase cmpoint_trajectory
|
|
#yields (region ( ( (\
|
|
(-3193.893132338269 14544.83214581003)\
|
|
(-3195.96408466695 14552.77233796307)\
|
|
(-3194.834068701427 14560.89997961932)\
|
|
(-3190.675624542305 14567.97407582664)\
|
|
(-3184.123697531491 14572.91449558814)\
|
|
(-3176.178689592596 14574.96689511693)\
|
|
(-3168.017418697178 14573.80513969528)\
|
|
(-3024.738279179143 14523.29005845494)\
|
|
(-3023.396895075166 14523.81345025783)\
|
|
(-3013.502721714583 14523.59308706634)\
|
|
(-2843.502721714583 14485.59308706634)\
|
|
(-2839.889436607304 14484.01886025721)\
|
|
(-2737.791900336638 14483.09906263315)\
|
|
(-2731.932740752651 14481.9124663562)\
|
|
(-2620.473848214378 14507.49319579122)\
|
|
(-2612.899218078519 14507.7581667033)\
|
|
(-2605.564162929844 14505.06145669763)\
|
|
(-2599.822536929913 14499.75966362682)\
|
|
(-2596.551018601779 14492.66230871689)\
|
|
(-2596.249130181142 14484.85307429409)\
|
|
(-2598.962966466713 14477.52433828412)\
|
|
(-2604.27815668849 14471.79511217625)\
|
|
(-2611.383134033621 14468.54018117637)\
|
|
(-2611.526151785622 14468.50680420878)\
|
|
(-2722.655221264061 14443.00177186947)\
|
|
(-2729.19055351437 14438.64575797138)\
|
|
(-2738.046536898055 14436.9000468763)\
|
|
(-2738.208099663362 14436.90093736685)\
|
|
(-2840.406442236398 14437.8216431558)\
|
|
(-2844.487231899825 14436.20736149431)\
|
|
(-2854.33286144601 14436.37073714466)\
|
|
(-2854.497278285417 14436.40691293366)\
|
|
(-3024.497278285417 14474.40691293366)\
|
|
(-3033.364225991968 14478.29471053929)\
|
|
(-3038.488042585621 14483.60383703904)\
|
|
(-3181.982581302822 14534.19486030472)\
|
|
(-3188.937421692982 14538.29177678565)))) )
|
|
query trajectory(cmphavel);
|
|
|
|
|
|
#testcase querycmpunits2
|
|
#yields success
|
|
query units(cmptest) namedtransformstream [Unit] consume;
|
|
|
|
|
|
#testcase querytouncertain
|
|
#yields success
|
|
query touncertain(train7, 5.5);
|
|
|
|
|
|
#testcase deletecmpoint
|
|
#yields success
|
|
delete cmptest1;
|
|
|
|
|
|
# 3 - Tests about the datatype hmpoint (hierarchical moving point)
|
|
|
|
|
|
#testcase hmpoint_no_components
|
|
#yields (int 329)
|
|
query no_components(htrain7);
|
|
|
|
|
|
#testcase generalize
|
|
#yields success
|
|
query generalize(train1, 30.5, 2.0);
|
|
|
|
|
|
#testcase getmpoint
|
|
#yields success
|
|
query getmpoint(htrain7);
|
|
|
|
|
|
#testcase getcmpoint
|
|
#yields (cmpoint (\
|
|
(344.9794279792633 (\
|
|
("2003-11-20-06:06" "2003-11-20-06:11:19.024" TRUE FALSE)\
|
|
(16821.0 1252.0 13837.0 2806.0)))\
|
|
(670.1852354470175 (\
|
|
("2003-11-20-06:11:19.024" "2003-11-20-06:22:50" TRUE FALSE)\
|
|
(13837.0 2806.0 11837.0 8980.0)))\
|
|
(1389.861161739539 (\
|
|
("2003-11-20-06:22:50" "2003-11-20-06:38:15.462" TRUE FALSE)\
|
|
(11837.0 8980.0 4813.0 8864.0)))\
|
|
(543.5225068634451 (\
|
|
("2003-11-20-06:38:15.462" "2003-11-20-06:50:09.600" TRUE FALSE)\
|
|
(4813.0 8864.0 3166.0 14269.0)))\
|
|
(348.7817465908955 (\
|
|
("2003-11-20-06:50:09.600" "2003-11-20-07:02" TRUE FALSE)\
|
|
(3166.0 14269.0 -3560.0 14235.0)))))
|
|
query getcmpoint(htrain7, 1620.0);
|
|
|
|
|
|
#testcase hmpoint_deftime
|
|
#yields (periods (( "2003-11-20-06:06" "2003-11-20-07:02" TRUE FALSE)) )
|
|
query deftime(htrain7);
|
|
|
|
|
|
#testcase hmpoint_present_instant
|
|
#yields (bool TRUE)
|
|
query htrain7 present six30;
|
|
|
|
|
|
#testcase hmpoint_present_periods1
|
|
#yields (bool FALSE)
|
|
query htrain1 present one43one56;
|
|
|
|
|
|
#testcase hmpoint_present_periods2
|
|
#yields (bool TRUE)
|
|
query htrain7 present one43one56;
|
|
|
|
|
|
#testcase hmpoint_passes_point1
|
|
#yields (bool TRUE)
|
|
query htrain7 passes mehringdamm;
|
|
|
|
|
|
#testcase hmpoint_passes_point2
|
|
#yields (bool FALSE)
|
|
query htrain7 passes alexanderplatz;
|
|
|
|
|
|
#testcase hmpoint_passes_region1
|
|
#yields (bool TRUE)
|
|
query htrain7 passes havel;
|
|
|
|
|
|
#testcase hmpoint_passes_region2
|
|
#yields (bool FALSE)
|
|
query htrain7 passes karpfenteich;
|
|
|
|
|
|
#testcase hmpoint_reduce_hierarchy
|
|
#yields success
|
|
query reduce_hierarchy(htrain7, 180.0);
|
|
|
|
|
|
#testcase hmpoint_atinstant1
|
|
#yields (ipoint ("2003-11-20-06:30" (8988.0 10323.0)) )
|
|
query htrain7 atinstant six30;
|
|
|
|
|
|
#testcase hmpoint_atinstant2
|
|
#yields (ipoint undef)
|
|
query htrain7 atinstant eight30;
|
|
|
|
|
|
#testcase hmpoint_atperiods1
|
|
#yields *train7AtSix10six30
|
|
query htrain7 atperiods six10_six30;
|
|
|
|
|
|
#testcase hmpoint_atperiods2
|
|
#yields (mpoint ( (\
|
|
("2003-11-20-07:01:45" "2003-11-20-07:01:50" TRUE FALSE)\
|
|
(-3545.223494643517 14306.11193202808 -3560.0 14235.0))\
|
|
(\
|
|
("2003-11-20-07:01:50" "2003-11-20-07:01:56" TRUE FALSE)\
|
|
(-3560.0 14235.0 -3560.0 14235.0))) )
|
|
query htrain7 atperiods one43one56;
|
|
|
|
|
|
#testcase hmpoint_p_at1
|
|
#yields (mpoint ( (\
|
|
("2003-11-20-06:27:50" "2003-11-20-06:28" TRUE FALSE)\
|
|
(9396.0 9871.0 9396.0 9871.0))\
|
|
(\
|
|
("2003-11-20-06:28" "2003-11-20-06:28" TRUE TRUE)\
|
|
(9396.0 9871.0 9396.0 9871.0))) )
|
|
query htrain7 d_at mehringdamm;
|
|
|
|
|
|
#testcase hmpoint_p_at2
|
|
#yields (mpoint ( (\
|
|
("2003-11-20-07:00:35.666" "2003-11-20-07:00:37.844" TRUE FALSE)\
|
|
(-2817.794984601848 14460.71887373515 -2849.0 14461.0))\
|
|
(\
|
|
("2003-11-20-07:00:37.844" "2003-11-20-07:00:40.858" TRUE TRUE)\
|
|
(-2849.0 14461.0 -2891.152879581152 14470.42240837696))) )
|
|
query htrain7 d_at havel;
|
|
|
|
|
|
# 4 - Tests about the datatype hcmpoint (hierarchical uncertain moving point)
|
|
|
|
|
|
#testcase hcmpoint_no_components
|
|
#yields (int 70)
|
|
query no_components(hctrain7);
|
|
|
|
|
|
#testcase hcmpoint_epsilon
|
|
#yields (real 57.8985236656)
|
|
query epsilon(hctrain7);
|
|
|
|
|
|
#testcase getmpoint
|
|
#yields error
|
|
query getmpoint(hctrain7);
|
|
|
|
|
|
#testcase hcmpoint_getcmpoint
|
|
#yields (cmpoint (\
|
|
(344.9794279792633 (\
|
|
("2003-11-20-06:06" "2003-11-20-06:11:19.024" TRUE FALSE)\
|
|
(16821.0 1252.0 13837.0 2806.0)))\
|
|
(670.1852354470175 (\
|
|
("2003-11-20-06:11:19.024" "2003-11-20-06:22:50" TRUE FALSE)\
|
|
(13837.0 2806.0 11837.0 8980.0)))\
|
|
(1389.861161739539 (\
|
|
("2003-11-20-06:22:50" "2003-11-20-06:38:15.462" TRUE FALSE)\
|
|
(11837.0 8980.0 4813.0 8864.0)))\
|
|
(543.5225068634451 (\
|
|
("2003-11-20-06:38:15.462" "2003-11-20-06:50:09.600" TRUE FALSE)\
|
|
(4813.0 8864.0 3166.0 14269.0)))\
|
|
(348.7817465908955 (\
|
|
("2003-11-20-06:50:09.600" "2003-11-20-07:02" TRUE FALSE)\
|
|
(3166.0 14269.0 -3560.0 14235.0)))))
|
|
query getcmpoint(hctrain7, 1620.0);
|
|
|
|
|
|
#testcase hcmpoint_deftime
|
|
#yields (periods (( "2003-11-20-06:06" "2003-11-20-07:02" TRUE FALSE)) )
|
|
query deftime(hctrain7);
|
|
|
|
|
|
#testcase hcmpoint_present_instant1
|
|
#yields (bool TRUE)
|
|
query hctrain7 present six30;
|
|
|
|
|
|
#testcase hcmpoint_present_instant2
|
|
#yields (bool FALSE)
|
|
query hctrain7 present eight30;
|
|
|
|
|
|
#testcase hcmpoint_present_periods2
|
|
#yields (bool TRUE)
|
|
query hctrain7 present one43one56;
|
|
|
|
|
|
#testcase hcmpoint_passes_point1
|
|
#yields (bool FALSE)
|
|
query hctrain7 d_passes mehringdamm;
|
|
|
|
|
|
#testcase hcmpoint_passes_point2
|
|
#yields (bool FALSE)
|
|
query hctrain7 d_passes alexanderplatz;
|
|
|
|
|
|
#testcase hcmpoint_passes_region1
|
|
#yields (bool FALSE)
|
|
query hctrain7 d_passes havel;
|
|
|
|
|
|
#testcase hcmpoint_passes_region2
|
|
#yields (bool FALSE)
|
|
query hctrain7 d_passes karpfenteich;
|
|
|
|
|
|
#testcase hcmpoint_passes_point1
|
|
#yields (bool TRUE)
|
|
query hctrain7 p_passes mehringdamm;
|
|
|
|
|
|
#testcase hcmpoint_passes_point2
|
|
#yields (bool FALSE)
|
|
query hctrain7 p_passes alexanderplatz;
|
|
|
|
|
|
#testcase hcmpoint_passes_region1
|
|
#yields (bool TRUE)
|
|
query hctrain7 p_passes havel;
|
|
|
|
|
|
#testcase hcmpoint_p_passes_region2
|
|
#yields (bool FALSE)
|
|
query hctrain7 p_passes karpfenteich;
|
|
|
|
|
|
#testcase hcmpoint_atinstant1
|
|
#yields (intimeregion ("2003-11-20-06:30" ( ( (\
|
|
(8894.35994735426 10294.41665943154)\
|
|
(8892.695430679325 10302.57295215564)\
|
|
(8894.283668018195 10310.74444093785)\
|
|
(8898.882154274843 10317.68343588739)\
|
|
(8905.788754872787 10322.33043437489)\
|
|
(8913.948913417797 10323.97589457879)\
|
|
(8922.116670012589 10322.36857414697)\
|
|
(8929.044904627357 10317.75389193851)\
|
|
(8933.67575760884 10310.83645546058)\
|
|
(8935.3021523637 10302.67247561839)\
|
|
(8933.751177216338 10294.69270099153)\
|
|
(8929.18515804605 10287.73229901328)\
|
|
(8922.300342200824 10283.05308566704)\
|
|
(8914.147959800273 10281.36952160306)\
|
|
(8905.9727834162 10282.93866718319)\
|
|
(8899.023065992662 10287.52093239761))))) )
|
|
query hctrain7 atinstant six30;
|
|
|
|
|
|
#testcase hcmpoint_atinstant2
|
|
#yields (intimeregion undef)
|
|
query hctrain7 atinstant eight30;
|
|
|
|
|
|
#testcase hcmpoint_atperiods1
|
|
#yields *ctrain7AtSix10six30
|
|
query hctrain7 atperiods six10_six30;
|
|
|
|
|
|
#testcase hcmpoint_atperiods2
|
|
#yields (cmpoint ( (31.65512809905122 (\
|
|
("2003-11-20-07:01:45" "2003-11-20-07:01:56" TRUE FALSE)\
|
|
(-3493.133765008297 14361.89942407184 -3542.169004002213 14268.83984641916)))) )
|
|
query hctrain7 atperiods one43one56;
|
|
|
|
|
|
#testcase hcmpoint_d_at1
|
|
#yields (cmpoint () )
|
|
query hctrain7 d_at mehringdamm;
|
|
|
|
|
|
#testcase hcmpoint_d_at2
|
|
#yields (cmpoint () )
|
|
query hctrain7 d_at havel;
|
|
|
|
|
|
#testcase hcmpoint_d_at3
|
|
#yields (cmpoint ( (15.98449910104948 (\
|
|
("2003-11-20-06:18:13.757" "2003-11-20-06:19:20.226" TRUE FALSE)\
|
|
(13089.09874601641 6916.940215561882 13029.0 7475.0)))\
|
|
(37.5971701626658 (\
|
|
("2003-11-20-06:19:20.226" "2003-11-20-06:21:10.297" TRUE FALSE)\
|
|
(13029.0 7475.0 12693.0 8321.0)))\
|
|
(36.23763903152665 (\
|
|
("2003-11-20-06:21:10.297" "2003-11-20-06:22:50" TRUE FALSE)\
|
|
(12693.0 8321.0 11837.0 8980.0)))\
|
|
(45.65458164381693 (\
|
|
("2003-11-20-06:22:50" "2003-11-20-06:27:35.899" TRUE FALSE)\
|
|
(11837.0 8980.0 9356.0 9665.0)))\
|
|
(23.21808662719284 (\
|
|
("2003-11-20-06:27:35.899" "2003-11-20-06:28:12.989" TRUE FALSE)\
|
|
(9356.0 9665.0 9421.0 9953.0)))\
|
|
(18.80154948106668 (\
|
|
("2003-11-20-06:28:12.989" "2003-11-20-06:28:48.607" TRUE FALSE)\
|
|
(9421.0 9953.0 9357.0 10176.0)))\
|
|
(29.7203403567062 (\
|
|
("2003-11-20-06:28:48.607" "2003-11-20-06:29:50" TRUE FALSE)\
|
|
(9357.0 10176.0 8988.0 10323.0)))\
|
|
(21.30347707877237 (\
|
|
("2003-11-20-06:29:50" "2003-11-20-06:30:33.783" TRUE FALSE)\
|
|
(8988.0 10323.0 8664.0 10234.0)))\
|
|
(41.29248078804144 (\
|
|
("2003-11-20-06:30:33.783" "2003-11-20-06:31:27.240" TRUE FALSE)\
|
|
(8664.0 10234.0 8434.0 9761.0)))\
|
|
(40.16833088146199 (\
|
|
("2003-11-20-06:31:27.240" "2003-11-20-06:32:12.509" TRUE FALSE)\
|
|
(8434.0 9761.0 8023.0 9608.0)))\
|
|
(11.87138336917626 (\
|
|
("2003-11-20-06:32:12.509" "2003-11-20-06:32:28.383" TRUE FALSE)\
|
|
(8023.0 9608.0 7829.0 9404.0)))\
|
|
(55.98113331807905 (\
|
|
("2003-11-20-06:32:28.383" "2003-11-20-06:37:30.044" TRUE TRUE)\
|
|
(7829.0 9404.0 5207.662567554972 8934.662396047639)))) )
|
|
query hctrain7 d_at thecenter;
|
|
|
|
|
|
#testcase hcmpoint_p_at1
|
|
#yields (cmpoint ( (23.21808662719284 (\
|
|
("2003-11-20-06:27:59.442" "2003-11-20-06:28:05.055" TRUE TRUE)\
|
|
(9397.260591577311 9847.81615960409 9407.09609485938 9891.395004915406)))) )
|
|
query hctrain7 p_at mehringdamm;
|
|
|
|
|
|
#testcase hcmpoint_p_at2
|
|
#yields (cmpoint ( (51.83638298538354 (\
|
|
("2003-11-20-07:00:36.399" "2003-11-20-07:00:50.124" TRUE TRUE)\
|
|
(-2771.031419758552 14505.46507237689 -2936.431429552312 14521.62599010101)))) )
|
|
query hctrain7 p_at havel;
|
|
|
|
|
|
#teardown
|
|
|
|
|
|
delete cuptest2;
|
|
|
|
|
|
delete cmptest2;
|
|
|
|
|
|
close database; |