/* ---- 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 ---- //paragraph [1] Title: [{\Large \bf \begin {center}] [\end {center}}] //[TOC] [\tableofcontents] [1] Header File of the Transportation Mode Algebra August, 2009 Jianqiu Xu March, 2010 Jianqiu xu [TOC] 1 Overview 2 Defines and includes */ #ifndef TransportationMode_H #define TransportationMode_H #include "Algebra.h" #include "NestedList.h" #include "QueryProcessor.h" #include "Algebras/RTree/RTreeAlgebra.h" #include "Algebras/BTree/BTreeAlgebra.h" #include "Algebras/Temporal/TemporalAlgebra.h" #include "StandardTypes.h" #include "LogMsg.h" #include "NList.h" #include "Algebras/Relation-C++/RelationAlgebra.h" #include "ListUtils.h" #include "Algebras/Network/NetworkAlgebra.h" #include "Algebras/FText/FTextAlgebra.h" #include #include "GeneralType.h" #include "Indoor.h" double TM_DiffTimeb(struct timeb* t1, struct timeb* t2); /* check whether the building id has been used already */ bool ChekBuildingId(int build_id) { ListExpr xObjectList = SecondoSystem::GetCatalog()->ListObjects(); xObjectList = nl->Rest(xObjectList); while(!nl->IsEmpty(xObjectList)) { // Next element in list ListExpr xCurrent = nl->First(xObjectList); xObjectList = nl->Rest(xObjectList); // Type of object is at fourth position in list ListExpr xObjectType = nl->First(nl->Fourth(xCurrent)); if(nl->IsAtom(xObjectType) && nl->SymbolValue(xObjectType) == "building") { // Get name of the pavement ListExpr xObjectName = nl->Second(xCurrent); std::string strObjectName = nl->SymbolValue(xObjectName); // Load object to find out the id of the pavement. Normally their // won't be to much networks in one database giving us a good // chance to load only the wanted network. Word xValue; bool bDefined; bool bOk = SecondoSystem::GetCatalog()->GetObject(strObjectName, xValue, bDefined); if(!bDefined || !bOk) { // Undefined network continue; } Building* build = (Building*)xValue.addr; if(build->GetId() == build_id) { SecondoSystem::GetCatalog()->CloseObject(nl->SymbolAtom("building"), xValue); return false; } SecondoSystem::GetCatalog()->CloseObject(nl->SymbolAtom("building"), xValue); } } return true; } /* check whether the building id has been used already */ bool ChekIndoorId(int build_id) { ListExpr xObjectList = SecondoSystem::GetCatalog()->ListObjects(); xObjectList = nl->Rest(xObjectList); while(!nl->IsEmpty(xObjectList)) { // Next element in list ListExpr xCurrent = nl->First(xObjectList); xObjectList = nl->Rest(xObjectList); // Type of object is at fourth position in list ListExpr xObjectType = nl->First(nl->Fourth(xCurrent)); if(nl->IsAtom(xObjectType) && nl->SymbolValue(xObjectType) == "indoorinfra") { // Get name of the pavement ListExpr xObjectName = nl->Second(xCurrent); std::string strObjectName = nl->SymbolValue(xObjectName); // Load object to find out the id of the pavement. Normally their // won't be to much networks in one database giving us a good // chance to load only the wanted network. Word xValue; bool bDefined; bool bOk = SecondoSystem::GetCatalog()->GetObject(strObjectName, xValue, bDefined); if(!bDefined || !bOk) { // Undefined network continue; } IndoorInfra* indoor = (IndoorInfra*)xValue.addr; if(indoor->GetId() == build_id) { SecondoSystem::GetCatalog()->CloseObject(nl->SymbolAtom("indoorinfra"), xValue); return false; } SecondoSystem::GetCatalog()->CloseObject(nl->SymbolAtom("indoorinfra"), xValue); } } return true; } /* check whether the metro graph id has been used already */ bool CheckIndoorGraphId(unsigned int ig_id) { ListExpr xObjectList = SecondoSystem::GetCatalog()->ListObjects(); xObjectList = nl->Rest(xObjectList); while(!nl->IsEmpty(xObjectList)) { // Next element in list ListExpr xCurrent = nl->First(xObjectList); xObjectList = nl->Rest(xObjectList); // Type of object is at fourth position in list ListExpr xObjectType = nl->First(nl->Fourth(xCurrent)); if(nl->IsAtom(xObjectType) && nl->SymbolValue(xObjectType) == "indoorgraph") { // Get name of the network ListExpr xObjectName = nl->Second(xCurrent); std::string strObjectName = nl->SymbolValue(xObjectName); // Load object to find out the id of the network. Normally their // won't be to much networks in one database giving us a good // chance to load only the wanted network. Word xValue; bool bDefined; bool bOk = SecondoSystem::GetCatalog()->GetObject(strObjectName, xValue, bDefined); if(!bDefined || !bOk) { // Undefined network continue; } IndoorGraph* ig = (IndoorGraph*)xValue.addr; if(ig->g_id == ig_id) { SecondoSystem::GetCatalog()->CloseObject(nl->SymbolAtom("indoorgraph"), xValue); return false; } SecondoSystem::GetCatalog()->CloseObject(nl->SymbolAtom("indoorgraph"), xValue); } } return true; } ///////////////////////////////////////////////////////////////////// ////////////// std::string descritpion for operators ///////////////////// //////////////////////////////////////////////////////////////////// ////////////std::string for Operator Spec ////////////////////////////////// const std::string OpTMCheckSlineSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( sline-> sline" "checksline(sline,int)" "correct dirty route line " "query routes(n) feed extend[newcurve: checksline(.curve,2)] count" "" ") )"; const std::string OpTMModifyBoundarySpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rectangle x int -> region" "modifyboundary(rectangle,2)" "extend the boundary of road network by a small value" "query modifyboundary(bbox(rtreeroad),2)" "" ") )"; const std::string OpTMSegment2RegionSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( relation x attr_name x int->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "segment2region(rel,attr, int)" "extend the halfsegment to a small region " "query segment2region(allroutes,curve,2) count" "" ") )"; const std::string OpTMPaveRegionSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel1 x attr x rel2 x attr1 x attr2 x int->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "paveregion(n,rel1,attr,rel2,attr1,attr2,int)" "cut the intersection region between road and pavement" "query paveregion(n,allregions_in,inborder, allregions_pave" ",pave1, pave2, roadwidth) count;" ") )"; const std::string OpTMJunRegionSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x attr1 x attr2 x int->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "junregion(n,rel,attr1,attr2,int)" "get the pavement region (zebra crossing) at junctions" "query junregion(n,allregions,inborder,outborder,roadwidth) count;" "" ") )"; const std::string OpTMDecomposeRegionSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "decomposeregion(region)" "decompose a region by its faces" "query decomposeregion(partition_regions) count; " ") )"; const std::string OpTMFillPavementSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x attr1 x attr2 x int->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "fillpavement(n,rel,attr1,attr2,int)" "fill the hole between pavements at junction" "query fillpavement(n, allregions_pave, pave1, pave2, 2)" "count;" ") )"; const std::string OpTMGetPaveNode1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x attr1 x attr2 x attr3->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "getpavenode1(network, rel, attr1, attr2, attr3)" "decompose the pavements of one road into a set of subregions" "" "query getpavenode1(n, pave_regions1, oid, pavement1,pavement2);" "" ") )"; const std::string OpTMGetPaveEdge1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x btree x attr1 x attr2 x attr3->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "getpaveedge1(network, rel, btree, attr1, attr2 , attr3)" "get the commone area of two pavements" "query getpaveedge1(n, subpaves, btree_pave,oid, rid ,pavement);" "" ") )"; const std::string OpTMGetPaveNode2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel x attr1 x attr2->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "getpavenode2(int, rel, attr1, attr2)" "decompose the zebra crossings into a set of subregions" "" "query getpavenode2(subpaves count, pave_regions2, rid, crossreg)" " count; " ") )"; const std::string OpTMGetPaveEdge2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree x attr1 x attr2 x attr3->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "getpaveedge2(rel1, rel2, btree, attr1, attr2, attr3)" "get the commone area between zc and pave" "query getpaveedge2(subpaves2, subpaves," "btree_pave, oid, rid , pavement) count; " ") )"; const std::string OpTMTriangulateSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region ->(stream ( (x1 t1)(x2 t2)...(xn tn)) " "triangulate(region)" "decompose a polygon into a set of triangles" "query triangulation(r1) count; " ") )"; const std::string OpTMTriangulate2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region ->(stream ( (x1 t1)(x2 t2)...(xn tn)) " "triangulate2(region)" "decompose a polygon into a set of triangles" "query triangulation2(r1) count; " ") )"; const std::string OpTMConvexSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region -> bool " "convex(region)" "detect whether a polygon is convex or concave" "query convex(r1); " ") )"; const std::string OpTMGeospathSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( point x point x region -> " " (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "geospath(point, point, region)" "return the geometric shortest path for two points indie a polygon" "" "query geospath(p1, p2, r1); " ") )"; const std::string OpTMCreateDGSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel x rel -> dualgraph" "createdualgraph(int, rel, rel)" "create a dual graph by the input edge and node relation" "query createdualgraph(1, edge-rel, node-rel); " ") )"; const std::string OpTMWalkSPOldSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( dualgraph x visualgraph x rel1 x rel2 x rel3-> line" "walk_sp_old(dg1, vg1, rel, rel, rel)" "get the shortest path for pedestrian" "query walk_sp_old(dg1, vg1, query_loc1, query_loc2,tri_reg_new);" "" ") )"; const std::string OpTMWalkSPSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( pavement x rel1 x rel2 x rel3-> line" "walk_sp(pn, rel, rel, rel)" "get the shortest path for pedestrian" "query walk_sp(pn, query_loc1, query_loc2,tri_reg_new);" "" ") )"; const std::string OpTMTestWalkSPSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( dualgraph x visualgraph x rel1 x rel2 x rel3 -> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "test_walk_sp(dualgraph, visibilitygraph, rel, rel, rel)" "get the shortest path for pedestrian" "query test_walk_sp(dg1, vg1, query_loc1, query_loc2,tri_reg_new);" "" ") )"; const std::string OpTMPaveLocToGPSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree x network-> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "pave_loc_togp(rel, rel, btree, network)" "map points in pavements to gpoints" "query pave_loc_togp(query_loc1, dg_node, btree_dg, n)" " count; " ") )"; const std::string OpTMSetPaveRidSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x rtree-> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "setpave_rid(rel1, rel2, rtree)" "set rid for each pavement" "query setpave_rid(dg_node, graph_node, rtree_pave) " " count; " ") )"; const std::string OpTMGenerateWPSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x int-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "generate_wp(rel, int)" "generate random points inside the polygon/triangle" "query generate_wp(graph_node,5); " ") )"; const std::string OpTMZvalSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( point -> int" "zval(point)" "calculate the z-order value of a point" "query zval(p1); " ") )"; const std::string OpTMZcurveSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "zcurve(rel, attr)" "calculate the curve of the given points sortby z-order" "query zcurve(vg_node,elem); " ") )"; const std::string OpTMRegVertexSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( reg ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "regvertex(region)" "return the vertex of the region as well as the cycleno" "query regvertex(node_reg); " ") )"; const std::string OpTMTriangulationNewSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( reg ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "triangulation_new(region)" "decompose the region into a set of triangles where each is" "represented by the three points" "query triangulation_new(r1) count; " ") )"; const std::string OpTMTriangulationExtSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( reg ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "triangulation_ext(region)" "decompose the region into a set of triangles where each is" "represented by the three points" "query triangulation_ext(r1) count; " ") )"; const std::string OpTMTriangulationNew2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( reg ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "triangulation_new2(region)" "decompose the region into a set of triangles where each is" "represented by the three points" "query triangulation_new2(r1) count; " ") )"; const std::string OpTMTriangulationExt2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( reg ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "triangulation_ext2(region)" "decompose the region into a set of triangles where each is" "represented by the three points" "query triangulation_ext2(r1) count; " ") )"; const std::string OpTMGetDGEdgeSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 ->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "get_dg_edge(rel,rel)" "get the edge relation for the dual graph on the triangles" "query get_dg_edge(rel1,rel2) count; " ") )"; const std::string OpTMSMCDGTESpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rtree ->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "smcdgte(rel, rtree)" "get the edge relation for the dual graph on the triangles" "query smcdgte(dg_node, rtree_dg) count; " ") )"; const std::string OpTMGetVNodeSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( dualgraph x rel1 x rel2 x rel3 x rel4 x btree->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "getvnode(dualgraph, rel1, rel2, rel3, rel4, btree)" "for a given point, it finds all its visible nodes" "query getvnode(dg1, query_loc1, tri_reg_new_sort, vgnodes," "vertex_tri, btr_vid) count;) )"; const std::string OpTMGetVGEdgeSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( dualgraph x rel1 x rel2 x rel3 x btree->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "getvgedge(dualgraph, rel1, rel2, rel3, btree)" "get the edge relation for the visibility graph" "query getvgedge(dg1, vgnodes, tri_reg_new_sort," "vertex_tri, btr_vid) count;) )"; const std::string OpTMMyInsideSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( line x region -> bool" "line myinside region" "checks whether a line is completely inside a region" "query l2 myinside r2; " ") )"; const std::string OpTMAtPointSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( sline x point x bool -> real" "point inside sline" "return the position of a point on a sline" "query at_point(sl, p, TRUE); " ") )"; const std::string OpTMDecomposeTriSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "decomposetri(rel)" "return the relation between vertices and triangle" "query decomposetri(tri_reg_new_sort) count; " ") )"; const std::string OpTMCreateVGSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel x rel -> dualgraph" "createvgraph(int, rel, rel)" "create a visibility graph by the input edge and node" "relation" "query createvgraph(1, edge-rel, node-rel); " ") )"; const std::string OpTMGetContourSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( text -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "getcontour(text)" "create regions from the data file" "query getcontour(pppoly) count; " ") )"; const std::string OpTMGetPolygonSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr -> region" "getpolygon(rel,attr)" "create one region by the input relation with contours" "query getpolygon(allcontours,hole); " ") )"; const std::string OpTMGetAllPointsSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "getallpoints(region)" "get all vertices of a polygon with its two neighbors" "query getallpoints(node_reg); " ") )"; const std::string OpTMRotationSweepSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x bbox x rel3 x attr ->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "rotationsweep(rel,rel,rectangle<2>,rel,attr)" "search visible points for the given point" "query rotationsweep(query_loc,allpoints,bbox,holes,hole); " ") )"; const std::string OpTMGetHoleSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "gethole(r)" "get all holes of a region" "query gethole(node_reg) count; " ") )"; const std::string OpTMGetSectionsSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel1 x rel1 x attr1 x attr2 x attr3" " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "getsections(n, r, r, attr,attr,attr)" "for each route, get the possible sections where interesting" "points can locate" "query getsections(n, r, paveregions, curve, rid, crossreg) count;" "" ") )"; const std::string OpTMGenInterestP1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rel x attr1 x attr2 x attr3 x attr4" " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "geninterestp1(r, r, attr, attr, attr, attr)" "generate interesting points locate in pavement" "query geninterestp1(subsections, pave_regions1, rid, sec," "pavement1, pavement2) count;" ") )"; const std::string OpTMGenInterestP2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rel x rtree x attr1 x attr2 x int " " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "geninterestp2(r, r, rtree, attr, attr, int)" "map the point inot a triangle and represent it by triangle" "query geninterestp2(interestp, dg_node, rtree_dg, loc2, pavement, 2)" "count;" ") )"; const std::string OpTMCellBoxSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( bbox x int-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "cellbox(bbox, 10)" "partition the bbox into 10 x 10 equal size cells" "query cellbox(bbox, 10)" "count;" ") )"; /* create region based outdoor infrastructure */ const std::string OpTMThePavementSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel -> pavenetwork" "thepavement(1, rel); " "create pavement infrastructure" "query thepavement(1, dg_node) ;) )"; /* create bus networks */ const std::string OpTMCreateBusRouteSpec1 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x attr1 x attr2 x attr3 x attr4 x btree x rel" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_route1(n,rel,attr1,attr2,attr3,attr4,btree,rel);" "" "create bus route1" "query create_bus_route1(n,street_sections_cell,sid_s,cellid_w_a_c," "Cnt_a_c,cover_area_b_c,section_cell_index, bus_para) count;" ") )"; const std::string OpTMCreateBusRouteSpec2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( space x rel1 x attr x btree x rel2 x attr1 x attr2 x attr3" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_route2(sp,rel,attr,btree,rel2,attr1,attr2,attr3);" "" "create bus routes" "query create_bus_route2(sp,street_sections_cell,cellid_w_a_c," "section_cell_index,rough_pair,start_cell_id,end_cell_id,route_type) " "count;" ") )"; const std::string OpTMRefineBusRouteSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x attr1 x attr2 x attr3 x attr4" " x attr5 x attr6 -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "refine_bus_route(network,rel,attr1,attr2,attr3,attr4,attr5,attr6);" "" "refine bus routes,filter some bus routes which are similar" "query refine_bus_route(n,busroutes_temp,br_id,bus_route1," "bus_route2,start_loc,end_loc,route_type) count;" ") )"; const std::string OpTMCreateBusRouteSpec3 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr1 x attr2 x attr3 x real" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_route3(rel,attr1,attr2,attr3,real);" "" "translate bus routes" "query create_bus_route3(busroutes,br_id,bus_route2,route_type" "roadwidth/2) count;" ") )"; const std::string OpTMCreateBusRouteSpec4 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x attr1 x attr2 x attr3 x attr4 x rel2 x attr1" " x attr2 -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_route4(rel1,attr1,attr2,attr3,attr4,rel2,attr1," "attr2);" "set up and down for bus routes" "query create_bus_route4(newbusroutes,br_id,bus_route2," "route_type, br_uid, bus_stops3, br_id, startSmaller) count;" ") )"; /* create bus stops for bus network */ const std::string OpTMCreateBusStopSpec1 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel1 x attr1 x attr2 x attr3 x attr4 x rel2 x btree" "x rel -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_stops1(n,rel1,attr1,attr2, attr3, attr4, rel2," " btree, rel);" "create bus stops" "query create_bus_stop1(n,busroutes,br_id,bus_route1," "bus_route2,route_type,subpaves2, btree_pave2, rel) count;" ") )"; const std::string OpTMCreateBusStopSpec2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel x attr1 x attr2 x attr3" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_stops2(n,rel,attr1,attr2, attr3);" "merge bus stops" "query create_bus_stop2(n,bus_stops1,br_id,bus_stop_id,bus_stop1) " "count;" ") )"; const std::string OpTMCreateBusStopSpec3 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel1 x attr x rel2 x attr1 x attr2 x attr3 x btree" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_stops3(n,rel1,attr,rel2,attr1,attr2,att3,btree);" "" "merge bus stops" "query create_bus_stop3(n,busroutes, bus_route1, bus_stops2," "br_id, bus_stop_id, bus_stop1,btree_sec_id) count;" ") )"; const std::string OpTMCreateBusStopSpec4 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x attr1 x attr2 x rel2 x attr1 x attr2 x attr3 x attr4" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_stops4(rel1,attr_a, attr_b,rel2,attr1,attr2,attr3,attr4);" "" "new position for bus stops after translate bus route" "query create_bus_stop4(newbusroutes, bus_route1,bus_route2," "bus_stops3,br_id, bus_stop_id, bus_stop2,startSmaller) count;" ") )"; const std::string OpTMCreateBusStopSpec5 = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x attr x rel2 x attr1 x attr2 x attr3 x attr4 x attr5" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_stops5(rel1,attr,rel2,attr1,attr2,attr3,attr4,attr5);" "" "set up and down value for each bus stop" "query create_bus_stop5(final_busroutes, bus_direction," "bus_stops4,br_id,br_uid, bus_stop_id, bus_stop2,bus_pos) count;" ") )"; /* bus stops with data type busstop */ const std::string OpTMGetBusStopsSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x btree x rel2" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn))))" "getbusstops(rel1,btree,rel2); " "create bus stops with data type busstop" "query getbusstops(final_busstops, btree_bs, final_busroutes)" " count;) )"; const std::string OpTMGetBusRoutesSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x btree x rel2" "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn))))" "getbusroutes(rel1,btree,rel2); " "create bus routes with data type busroute" "query getbusroutes(final_busstops, btree_bs, final_busroutes)" " count;) )"; const std::string OpTMBRGeoDataSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busroute -> sline" "brgeodata(busroute); " "get the geometrical data of a bus route" "query brgeodata(br1);) )"; const std::string OpTMBSGeoDataSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busstop x busroute -> point" "bsgeodata(busstop, busroute); " "get the geometrical data of a bus stop" "query bsgeodata(bs1, br1);) )"; const std::string OpTMGetStopIdSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busstop -> int" "getstopid(busstop); " "get bus stop id" "query getstopid([const busstop value (1 2 TRUE)]) ;) )"; const std::string OpTMUpDownSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busstop -> bool" "up_down(busstop); " "get direction of the bus stop" "query up_down([const busstop value (1 2 TRUE)]) ;) )"; /* create bus network */ const std::string OpTMTheBusNetworkSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel x rel x rel -> busnetwork" "thebusnetwork(1, rel, rel, rel); " "create bus network" "query busnetwork(1, bus_stops, bus_routes, bus) ;) )"; const std::string OpTMBusStopsSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busnetwork -> rel" "bn_busstops(busnetwork); " "get bus stops relation" "query bn_busstops(bn1) ;) )"; const std::string OpTMBusRoutesSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busnetwork -> rel" "bn_busroutes(busnetwork); " "get bus routes relation" "query bn_busroutes(bn1) ;) )"; const std::string OpTMMapBRSegmentsSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( line x line -> (stream(((x1 t1) ... (xn tn))))" "brsegments(line, line); " "decompose a bus route" "query brsegments(l1,l2) count ;) )"; const std::string OpTMMapBsToPaveSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busnetwork x rtree x rel x int x real" " -> (stream(((x1 t1) ... (xn tn))))" "mapbstopave(bn1, rtree_dg, dg_node, roadwidth, real);" " " "map bus stops to pavement areas" "query mapbstopave(bn1, rtree_dg, dg_node, roadwidth, real)" " count ;) )"; /* build the connection between bus stops and pavements */ const std::string OpTMBsNeighbors1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( dualgraph x visibility graph x rel1 x rel2 x rtree" " -> (stream(((x1 t1) ... (xn tn))))" "bs_neighbors1(dual graph, visibility graph rel, rel, rtree);" " " "for each bus stop find its neighbor bus stops" "query bs_neighbors1(dg, vg, tri_reg_new, bs_pave_sort, rtree_bs_pave)" " count ;) )"; const std::string OpTMBsNeighbors2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busnetwork -> (stream(((x1 t1) ... (xn tn))))" "bs_neighbors2(busnetwork)" "bus stops with the same 2D point, but different bus routes" "query bs_neighbors2(bn1) count ;) )"; const std::string OpTMBsNeighbors3Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rel x btree -> (stream(((x1 t1) ... (xn tn))))" "bs_neighbors3((rel1, rel2, btree)" "bus stops connected by moving buses" "query bs_neighbors3(bus_time_table, all_bus_rel, btree_mo)" " count ;) )"; /* create a graph on bus network including pavements connection */ const std::string OpTMCreateBusGraphSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel1 x rel2 x rel3 x rel4-> busgraph" "createbgraph(int, rel, rel, rel, rel)" "create a bus network graph by the input edges and nodes" "relation" "query createbgraph(1, node-rel, edge1, edge2, edge3); " ") )"; const std::string OpTMGetAdjNodeSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busgraph x int -> (stream(((x1 t1) ... (xn tn))))" "getadjnode(busgraph, int)" "get the neighbor nodes of a given graph node" "query getadjnode(bg1, 2); " ") )"; const std::string OpTMBNNavigationSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busstop x busstop x busnetwork x instant x int" " -> (stream(((x1 t1) ... (xn tn))))" "bnnavigation(busstop,bussstop,busnetwork,instant,int)" "navigation in bus network system" "query bnnavigation(bs1, bs2, bn1, " "theInstant(2010,12,5,16,0,0,0),0) count; " ") )"; const std::string OpTMTestBNNavigationSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rel x busnetwork x instant x int-> bool" "test_bnnavigation(rel,rel,busnetwork,instant,int)" "test the operator bnnavigation" "query test_bnnavigation(bus_stops, bus_stops, bn1, " "theInstant(2010,12,5,16,0,0,0),0) count; " ") )"; /* get traffic data and set time schedule for moving buses */ const std::string OpTMGetRouteDensity1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel1 x attr1 x attr2 x btree x rel2 x attr1 x attr2" " x periods1 x periods2 -> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "get_route_density1(network,rel1,attr1,attr2,btree,rel2,attr1, attr2," "peridos1,periods2);" "distinguish daytime and night bus routes" "query get_route_density1(n,traffic_rel1,secid,flow,btree_traffic," "busroutes,br_id,bus_route1,night1,night2) count;" ") )"; const std::string OpTMSETTSNightBusSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr1 x attr2 x attr3 x periods1 x periods2 -> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "set_ts_nightbus(rel,attr1,attr2,attr3,peridos1,periods2);" "set time schedule for night buses" "query set_ts_nightbus(night_bus,br_id,duration1,duration2," "night1,night2) count;" ") )"; const std::string OpTMSETTSDayBusSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr1 x attr2 x attr3 x periods1 x periods2 -> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "set_ts_daybus(rel,attr1,attr2,attr3,peridos1,periods2);" "set time schedule for daytime buses" "query set_ts_daybus(day_bus,br_id,duration1,duration2," "night1,night2) count;" ") )"; const std::string OpTMSETBRSpeedBusSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( network x rel1 x attr1 x attr2 x rel2 x attr x rel3 x attr-> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "set_br_speed(network,rel1,attr1,attr2,rel2,attr,rel3," "attr);" "set speed value for each bus route" "query set_br_speed(n,busroutes,br_i,d,bus_route1," "streets,Vmax,final_busroutes,startSmaller) count;" ") )"; const std::string OpTMCreateBusSegmentSpeedSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x attr1 x attr2 x attr3 x attr4 x rel2 x attr1 x attr2" " x btree1 x rel3 x btree2-> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_bus_segment_speed(rel,attr1,attr2,attr3,attr4,rel,attr1" "attr2, btree, rel, btree);" "set speed value for each bus route segment " "query create_bus_segment_speed(final_busroutes, br_id, bus_route, " "bus_direction,startSmaller,final_busstops, bus_pos," "stop_direction, btree_bs,br_speed, btree_br_speed) count;" ") )"; const std::string OpTMCreateNightBusSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree " "->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_night_bus_mo(rel,rel,btree);" "create night moving bus " "query create_night_bus_mo(ts_nightbus, " "bus_segment_speed,btree_seg_speed) count;" ") )"; const std::string OpTMCreateDayTimeBusSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree " "->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_daytime_bus_mo(rel,rel,btree);" "create daytime moving bus " "query create_daytime_bus_mo(ts_daybus, " "bus_segment_speed,btree_seg_speed) count;" ") )"; const std::string OpTMCreateTimeTable1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree x periods x periods" "->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_time_table1(rel,rel,btree,periods,periods);" "create time table at each spatial location " "query create_time_table1(final_busstops,all_bus_rel,btree_mo," "night1, night2) count;" ") )"; const std::string OpTMCreateTimeTable2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree " "->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "create_time_table2(rel,rel,btree);" "compact storage of time tables " "query create_time_table2(train_stops,ubtrains,btree_train)" "count;" ") )"; const std::string OpTMRefMO2GenMOSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree " "->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "refmo2genmo(rel1, rel2, btree );" "convert trains to generic moving objects " "query refmo2genmo(Trains, ubahn_line, btree_ub_line) count;" ") )"; //////////////////////////////////////////////////////////// //////////////////// metro network ///////////////////////// //////////////////////////////////////////////////////////// const std::string OpTMTheMetroNetworkSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel x rel x rel-> metronetwork" "themetronetwork(1, rel, rel, rel); " "create metro network" "query metronetwork(1, metro_stops, metro_routes, metros) " ";) )"; const std::string OpTMMSNeighbor1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "ms_neighbors1(rel); " "create edges for metro graph" "query ms_neighbors1(metro_stops) count " ";) )"; const std::string OpTMMSNeighbor2Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( metronetwork x rel x btree x rel x btree->" " (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "ms_neighbors2(metronetwork,rel,btree,rel,btree); " "create edges for metro graph" "query ms_neighbors2(mn,timetable1,btree, genmo_rel,btree) count " ";) )"; const std::string OpTMCreateMetroGraphSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel1 x rel2 x rel3 -> metrograph" "createmgraph(int, rel, rel, rel)" "create a metro network graph by the input edges and nodes" "relation" "query createmgraph(1, node-rel, edge1, edge2); " ") )"; const std::string OpTMCreateMetroRouteSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( dualgraph x rel " "-> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createmetroroute(dualgraph, rel)" "create metro routes" "query createmetroroute(dualgraph, metro_para); " ") )"; const std::string OpTMCreateMetroStopSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createmetrostop(rel)" "create metro stops" "query createmetrostop(rel); " ") )"; const std::string OpTMCreateMetroMOSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x duraion ->" " (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createmetromo(rel, duration)" "create moving metro " "query createmetromo(rel, duration); " ") )"; const std::string OpTMMapMsToPaveSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rel x rtree ->" " (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "mapmstopave(rel, rel, rtree)" "map metro stops to pavement areas " "query mapmstopave(rel, rel, rtree); " ") )"; const std::string OpTMMNNavigationSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( busstop x busstop x busnetwork x instant" " -> (stream(((x1 t1) ... (xn tn))))" "mnnavigation(busstop,bussstop,metronetwork,instant)" "navigation in metro network system" "query mnnavigation(ms1, ms2, mn1, " "theInstant(2010,12,5,16,0,0,0)) count; " ") )"; const std::string OpTMNearStopBuildingSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( space x std::string " " ->(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "nearstops_building(space, std::string)" "find buildings near to bus stops" "query nearstops_building(space, Bus)" ") )"; const std::string OpTMInstant2DaySpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( instant -> int " "instant2day(instant);" "get the day (int value) of time" "query instant2day(theInstant(2007,6,3,9,0,0,0));" ") )"; /* build a path between the entrance of the building and the pavement area */ const std::string OpTMPathToBuildingSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel1 x rel2 x btree x space->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "path_to_building(rel, rel, btree, space);" "build the connection between building and pavement" "query path_to_building(building_rect, new_region_elems," "btree_region_elem, space_1);" ") )"; const std::string OpTMSetBuildingTypeSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x rtree x space -> " "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "set_building_type(rel, rtree, space);" "set the type for each building" "query set_building_type(building_region_type, " "rtree_build, space_1);" ") )"; /* remove dirty region data */ const std::string OpTMRemoveDirtySpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr1 x attr2 ->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "" "remove_dirty(rel, attr, attr);" "clear some dirty region data" "query remove_dirty(region_elems, id, covarea);" ") )"; const std::string OpTMModifyLineSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( line -> line" "modifyline(line)" "modify the coordinates of a line, for numeric problem" "query modifyline([const line value ((2.33 3.33 4.444 5.555))])" "" ") )"; const std::string OpTMCheckRoadsSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( relation x rtree" " ->(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "checkroads(rel, rtree)" "check the coordinates of a line" "query checkroads(r,rtree_road)" ") )"; const std::string OpTMTMJoin1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( relation x relation x rtree" " ->(stream (tuple( (x1 t1)(x2 t2)...(xn tn))) " "tm_join1(rel, rel, rtree)" "check the intersection of routes and cell boxes" "query tm_join1(r, cell_box, rtree_box)" ") )"; /* get the maximum rectangle from a convex polygon */ const std::string OpTMMaxRectSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( region -> rect " "maxrect(region);" "get the maximum rectangle area for a region" "query maxrect(r1);" ") )"; const std::string OpTMGetRect1Spec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( rel x attr1 x attr2 x rel->" "(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "getrect1(rel, attr, attr, rel);" "get the maximum rectangle area for a region" "query getrect1(new_region_elems2, id, covarea, para_rel);" ") )"; ///////////////////////////////////////////////////////////////////////////// /////////////////////// Indoor Operators ///////////////////////////////// ///////////////////////////////////////////////////////////////////////////// const std::string SpatialSpecTheFloor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( float x region -> floor3d" "thefloor ( _, _ ) " "create a floor3d object." "query thefloor (5.0, r) ) )"; const std::string SpatialSpecGetHeight = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( floor3d -> float" "getheight ( _ ) " "get the ground height of a floor3d object" "query getheight(floor3d_1) ) )"; const std::string SpatialSpecGetRegion = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( floor3d -> region" "getregion ( _ ) " "get the ground area of a floor3d object" "query getregion(floor3d_1) ) )"; const std::string SpatialSpecTheDoor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x line x int x line x mbool x bool -> door3d" "thedoor ( _,_,_,_, _,_ ) " "create a door3d object." "query thedoor (1,l1,2,l3,doorstate, FALSE) ) )"; const std::string SpatialSpecTypeOfDoor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( door3d -> bool" "type_of_door ( _ ) " "get the type of door: lift or non-lift" "query type_of_door (door1) ) )"; const std::string SpatialSpecLocOfDoor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( door3d x int -> line" "loc_of_door (_, _) " "get the relative location of door" "query loc_of_door (door1,1) ) )"; const std::string SpatialSpecStateOfDoor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( door3d -> mbool" "state_of_door (_) " "get the time dependent state of door" "query state_of_door (door1) ) )"; const std::string SpatialSpecGetFloor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( groom x int -> floor3d" "get_floor (_, _) " "get one element of a groom" "query get_floor (groom1, 0) ) )"; const std::string SpatialSpecAddHeightGRoom = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( groom x real -> groom" "add_height_groom(_, _) " "move the groom to a new height by adding input" "query add_height_groom(groom1, 3.0) ) )"; const std::string SpatialSpecTranslateGRoom = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( groom x real x real -> groom" "_ translate_groom [_, _] " "translate the 2D area of a groom" "query groom1 translate_groom [20.0, 0.0] ) )"; const std::string SpatialSpecLengthLine3D = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( line3d -> real" " size(_) " "return the length of a 3D line" "query size(l3d1) ) )"; const std::string SpatialSpecBBox3D = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( line3d -> rect3" " bbox3d(_) " "return the bounding box of a 3D line" "query bbox3d(l3d1) ) )"; const std::string SpatialSpecTheBuilding = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x std::string x rel x rel -> building " "thebuilding(int,std::string,rel,rel) " "create a building for its rooms" "query thebuilding(1, \"UNIVERSITY\", fernuni, fernuni_extend)" " ) )"; const std::string SpatialSpecTheIndoor = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x rel x rel -> building " "theindoor(int,rel,rel) " "create the indoor infrastructure " "query theindoor(1, paths1, buildingplustype) ) )"; const std::string SpatialSpecCreateDoor3D = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createdoor3d() " "create a 3d line for each door" "query createdoor3d(university) count ) )"; const std::string SpatialSpecCreateDoorBox = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createdoorbox(rel) " "create a 3d box for each door" "query createdoorbox(university) count ) )"; const std::string SpatialSpecCreateDoor1 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel1 x rel2 x rtree x attr1 x attr2 x attr3" " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn))))" "createdoor1(rel,rel,rtree,attr,attr,attr) " "create a relation storing doors of a building" "query createdoor1(university, box3d_rel, rtree_box3d, groom_oid, " "groom_tid, Box3d) count ) )"; const std::string SpatialSpecCreateDoor2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createdoor2(rel) " "create a relation of virtual doors for staircase" "query createdoor2(university_uni) count ) )"; const std::string SpatialSpecCreateAdjDoor1 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel1 x rel2 x btree x attr1 x attr2 x attr3 x attr4" " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createadjdoor1(rel,rel,btree,attr,attr,attr,attr) " "create the connecting edges for two doors inside one room" "query createadjdoor1(building_uni, node_rel, createbtree, " "Door, door_loc, groom_oid1, doorheight) count ) )"; const std::string SpatialSpecCreateAdjDoor2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel x rtree " " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "createadjdoor2(rel,rtree) " "create the connecting edge for the same door which can belong to " "two rooms " "query createadjdoor2(node_rel, rtree_node) count ) )"; const std::string SpatialSpecPathInRegion = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( region x point x point -> line" "path_in_region(region,point,point) " "create the shortest path connecting two points inside a region" "query size(path_in_region(reg1, p1, p2)) ) )"; const std::string OpTMCreateIGSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel x rel x std::string -> indoorgraph" "createigraph(int, rel, rel, std::string)" "create an indoor graph by the input edges and nodes" "relation" "query createigraph(1, edge-rel, node-rel, \"cinema\"); " ") )"; const std::string SpatialSpecGenerateIP1 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel x int x bool->(stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "generate_ip1(rel, int, bool) " "create indoor positions" "query generate_ip1(building_uni,20, TRUE) count ) )"; const std::string SpatialSpecIndoorNavigation = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel x genloc x genloc x rel x btree x int" " -> (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "indoornavigation(ig,genloc,genloc,rel,btree, int) " "indoor trip planning" "query indoornavigation(ig, gloc1, gloc2, building_uni, btree_groom 0)" " count ) )"; const std::string SpatialSpecGenerateMO1 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( indoorgraph x rel x btree x rtree x int x periods ->" " (stream (tuple( (x1 t1)(x2 t2)...(xn tn)))" "generate_mo1(indoorgraph, rel,btree, rtree, int, periods) " "create indoor moving objects" "query generate_mo1(ig1, fernuni, btree_groom, rtree_groom, 20, Monday)" " count ) )"; const std::string SpatialSpecGetIndoorPath = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( std::string x int ->line3d" "getindorpath(std::string, int) " "read indoor shortest path from disk files" "query getindoorpath(UNIVERSITY, 10001001) count ))"; /* create an empty space */ const std::string SpatialSpecTheSpace = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int -> space " "thespace (_) " "create an empty space" "query thespace(1) ) )"; const std::string SpatialSpecPutInfra = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x network -> (stream(((x1 t1) ... (xn tn))) " "putinfra (space, network) " "add infrastructures to the space" "query putinfra(space_1, rn) ) )"; const std::string SpatialSpecPutRel = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x rel -> (stream(((x1 t1) ... (xn tn))) " "putrel (space, rel) " "add relations to the space" "query putinfra(space_1, rel) ) )"; const std::string SpatialSpecGetInfra = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x std::string -> rel " "getinfra (space, \"LINE\") " "get required infrastructure from the space" "query getinfra(space_1, \"LINE\") ) )"; const std::string SpatialSpecGenMOTMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( bool -> (stream(((x1 t1) ... (xn tn))) " "genmo_tm_list (bool) " "output all possible transportation modes of moving objects" "query genmo_tm_list(TRUE) ) )"; const std::string SpatialSpecGenerateGMOTMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x int x rel x btree x rel" " -> (stream(((x1 t1) ... (xn tn))) " "generate_genmo (space, periods, real, int) " "generate generic moving objects " "query generate_genmo(space_1, TwoDays, 30, 4) ) )"; const std::string SpatialSpecGenerateGMOBench1TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x rel x rel x rel" " -> (stream(((x1 t1) ... (xn tn))) " "generate_bench_1 (space, periods, real, rel, rel, rel) " "generate generic moving objects " "query generate_bench_1(space_1, hw_time, 5.0, distri_para1," " H_Building, W_Building) ) )"; const std::string SpatialSpecGenerateGMOBench2TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x rel x std::string" " -> (stream(((x1 t1) ... (xn tn))) " "generate_bench_2 (space, periods, real, rel, std::string) " "generate generic moving objects " "query generate_bench_2(space_1, tuesday, 5.0, Buildingrel, " "\"REGION\") ) )"; const std::string SpatialSpecGenerateGMOBench3TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x rel x rtree" " -> (stream(((x1 t1) ... (xn tn))) " "generate_bench_3 (space, periods, real, rel, rtree) " "generate generic moving objects " "query generate_bench_3(space_1, monday, 3.0, NN_Building, " "rtree_NNB) ) )"; const std::string SpatialSpecGenerateGMOBench4TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x rel x rel x rtree" " -> (stream(((x1 t1) ... (xn tn))) " "generate_bench_4 (space, periods, real, rel, rel, rtree) " "generate generic moving objects " "query generate_bench_4(space_1, monday, 3.0, dist_para, NN_Building, " "rtree_NNB) ) )"; const std::string SpatialSpecGenerateGMOBench5TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x rel x rel x rel" " -> (stream(((x1 t1) ... (xn tn))) " "generate_bench_5 (space, periods, real, rel, rel, rel) " "generate generic moving objects " "query generate_bench_5(space_1, hw_time, 5.0, distri_para3," " H_Building, W_Building) ) )"; const std::string SpatialSpecGenerateCarList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x periods x real x rel" " -> (stream(((x1 t1) ... (xn tn))) " "generate_car (space, periods, real, rel) " "generate moving cars in road network to get traffic " "query generate_car(space_1, TwoDays, 30.0, streets_speed) ))"; const std::string SpatialSpecGetRGNodesTMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( network -> (stream(((x1 t1) ... (xn tn))) " "get_rg_nodes(network) " "get road graph nodes " "query get_rg_nodes(rn) count ) )"; const std::string SpatialSpecGetRGEdges1TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel x rtree -> (stream(((x1 t1) ... (xn tn))) " "get_rg_edges1(rel, rtree) " "get road graph edges " "query get_rg_edges1(rel, rtree) count ) )"; const std::string SpatialSpecGetRGEdges2TMList = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( network x rel -> (stream(((x1 t1) ... (xn tn))) " "get_rg_edges2(network, rel) " "get road graph edges " "query get_rg_edges2(rn, rel) count ) )"; const std::string OpTMCreateRoadGraphSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( int x rel1 x rel2 x rel3 -> roadgraph" "creatergraph(int, rel, rel, rel)" "create a road network graph by the input edges and nodes" "relation" "query creatergraph(1, node-rel, edge1, edge2); " ") )"; /* shortest path in road network */ const std::string OpTMShortestPathTMSpec = "( ( \"Signature\" \"Syntax\" \"Meaning\" " "\"Example\" ) " "( gpoint x gpoint x roadgraph x network ->" " (stream(((x1 t1) ... (xn tn)))" "shortestpath_tm(gpoint, gpoint, roadgraph, network)" "return the shortest path in road network for two gpoints" "query shortestpath_tm(gp1, gp2, rg1, rn); " ") )"; const std::string SpatialSpecNavigation1List = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( space x rel x rel x instant x rel x rel x rtree" " -> (stream(((x1 t1) ... (xn tn))) " "navigation1 (space, rel,rel,instant, rel,rel, rtree) " "navigation with modes bus and walk" "query navigation1(space_1, queryloc1, queryloc2, instant1, tri_reg_new," "bs_pave_sort, rtree_bs_pave) ) )"; const std::string SpatialSpecRefId = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genloc -> int" "ref_id (genloc) " "get the reference id of a genloc object" "query ref_id (genloc1) ) )"; const std::string SpatialSpecSetMORefId = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> (stream uT)" "ref_id (genmo) " "get the reference id of a generic moving object" "query ref_id (genmo1) ) )"; const std::string SpatialSpecTMAT = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x std::string -> genmo" "tm_at (genmo, std::string) " "get the moving object with one mode" "query tm_at(genmo1, \"Indoor\") ) )"; const std::string SpatialSpecTMAT2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x mreal x std::string -> genmo" "tm_at2(genmo, mreal, std::string) " "get the moving object with one mode" "query tm_at(genmo1, mreal1, \"Indoor\") ) )"; const std::string SpatialSpecTMAT3 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x mreal x genloc x std::string -> genmo" "tm_at2(genmo, mreal, genloc, std::string) " "get the moving object with one mode" "query tm_at(genmo1, mreal1, genloc1,\"Indoor\") ) )"; const std::string SpatialSpecTMVal = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( igenloc -> genloc" "val(igenloc) " "get the genloc for a igenloc" "query val(igloc) ) )"; const std::string SpatialSpecTMInst = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( igenloc -> instant" "tm_inst (igenloc) " "get the instant for a igenloc" "query tm_inst(igloc) ) )"; const std::string SpatialSpecTMContain = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x std::string -> bool" "contains (genmo, std::string) " "check whether the moving object contains one mode" "query contains(genmo1, \"Indoor\") ) )"; const std::string SpatialSpecTMContain2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x mreal x int x space -> bool" "tmcontains (genmo,mreal,int,space) " "check whether the moving object contains a reference int" "query tmcontains(genmo1, uindex,123,space_1) ) )"; const std::string SpatialSpecTMDuration = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( periods x std::string -> real" "tm_duration (periods, std::string) " "return the period duration by specifying time unit" "query tm_duration(peri1, \"M\") ) )"; const std::string SpatialSpecTMInitial = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> igenloc" "tm_initia (genmo) " "return the intime genloc of a genmo" "query initial(genmo1) ) )"; const std::string SpatialSpecTMBuildId = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x space -> int" "tm_build_id (int, space) " "return the building id of an reference" "query tm_build_id(0, space1) ) )"; const std::string SpatialSpecTMBContains = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x int -> bool" "genmo bcontains int " "check whether a building id is contained" "query genmo1 bcontains 123456 ) )"; const std::string SpatialSpecTMBContains2 = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x mreal x int -> bool" "genmo bcontains int " "check whether a building id is contained, with index on units" "query bcontains(genmo1, uindex, 123456) ) )"; const std::string SpatialSpecTMRoomId = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x space -> int" "tm_room_id (int, space) " "return the room id of an reference" "query tm_room_id(0, space1) ) )"; /* create a new id by combining the two input integers e.g., 123 + 34 = 12334 */ const std::string SpatialSpecTMPlusId = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x int -> int" "tm_plus_id (int, int) " "combine two integers" "query tm_plus_id(20, 13) ) )"; const std::string SpatialSpecTMPass = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x region x space -> bool" "passes (genmo, region, space) " "check whether a moving object passes an area" "query passes(genmo1, reg, space1) ) )"; const std::string SpatialSpecTMDistance = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genloc x point x space -> bool" "tm_passes (genloc, point, space) " "return the distance between a genloc and a point" "query tm_distance(genloc1, p1, space1) ) )"; const std::string SpatialSpecTMGenLoc = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( int x real x real -> genloc" "tm_genloc (int, real, real) " "create a genloc " "query tm_genloc(2, 3.0, -1.0) ) )"; const std::string SpatialSpecModeVal = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> int" "modeval(genmo) " "create an integer for modes " "query modeval(genmo1) ) )"; const std::string SpatialSpecGenMOIndex = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> mreal" "genmoindex(genmo) " "create an index on genmo units " "query genmoindex(genmo1) ) )"; const std::string SpatialSpecGenMODeftime = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> periods" "deftime (genmo) " "get the deftime time of a generic moving object" "query deftime (genmo) ) )"; const std::string SpatialSpecGenMONoComponents = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> int" "no_components (genmo) " "get the number of units in a generic moving object" "query no_components(genmo) ) )"; /* return the location representation in an approximate way */ const std::string SpatialSpecLowRes = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> genmo" "lowres (genmo) " "return the low resolution of generic moving object" "query lowres(genmo1) ) )"; const std::string SpatialSpecTMTrajectory = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( mpoint3d -> line3d" "trajectory (mpoint3d) " "get the trajectory of a 3d moving object" "query trajectory(mp3_1) ) )"; const std::string SpatialSpecGenTrajectory = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> genrange" "trajectory (genmo) " "get the trajectory of a moving object" "query trajectory(genmo) ) )"; const std::string SpatialSpecGenrangeVisible = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genrange -> (stream(((x1 t1) ... (xn tn))))" "genrangevisible (genrange, space) " "get the 2d line or 3d line in space, visible in javagui" "query genrangevisible(gr1, space1) ) )"; const std::string SpatialSpecGetMode = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> (stream(((x1 t1) ... (xn tn)))" "getmode (_) " "return the transportation modes" "query getmode(genmo1) ) )"; const std::string SpatialSpecGetRef = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> (stream(((x1 t1) ... (xn tn)))" "getref (_) " "return the referenced objects in a light way" "query getref(genmo1) ) )"; const std::string SpatialSpecAtInstant = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x instant -> igenloc" "_ atinstant _ " "return the instant value of a generic moving object" "query genmo1 atinstant instant 1 ) )"; const std::string SpatialSpecAtPeriods = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x periods -> genmo" "_ atperiods _ " "return the movement in a given period " "query genmo1 atperiods periods1 ) )"; const std::string SpatialSpecMapGenMO = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo x mpoint -> mpoint" "genmo mapgenmo mpoint " "map a genmo to a mpoint " "query mapgenmo(genmo1, mp1) ) )"; const std::string SpatialSpecMapTMUnits = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( genmo -> (stream(((x1 t1) ... (xn tn)))) " "units(genmo) " "get units of a moving object " "query units(genmo1) ) )"; const std::string SpatialSpecMapGetLoc = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( ugenloc x bool -> point " "getloc(ugenloc, bool) " "get locatation of a ugenloc " "query getloc(ugenloc1,TRUE) ) )"; const std::string SpatialSpecMapTMTraffic = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( rel x periods x rel x bool -> " " (stream(((x1 t1) ... (xn tn)))) " "tm_traffic(rel, periods, rel, bool) " "get the traffic value " "query tm_traffic(all_genmo,Qt, roadsegs,true) ) )"; /* add graphs into infrastructures */ const std::string SpatialSpecAddInfraGraph = "( ( \"Signature\" \"Syntax\" \"Meaning\" \"Example\" ) " "( busnetwork x busgraph -> (stream(((x1 t1) ... (xn tn)))) " "addinfragraph (busnetwork,busgraph) " "add navigation graph to the corresponding infrastructure" "query addinfragraph(bn1,bg1) ) )"; #endif