delta_test.ql 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. [diff:"2018-02-01T00:01:00Z","2018-02-01T01:01:00Z"];
  2. (
  3. make point ::geom=pt(48.1,11.004);
  4. make point ::geom=pt(48.1,11.005);
  5. make point ::geom=pt(48.1,11.006);
  6. )->.point;
  7. node(2001)->.n;
  8. .n convert equal_geom ::=::;
  9. out geom;
  10. .n convert equal_geom ::=::,::geom=pt(48,11);
  11. out geom;
  12. .n convert equal_geom ::=::,::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001));
  13. out geom;
  14. .n convert equal_geom ::=::,::geom=poly(lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001)));
  15. out geom;
  16. .n convert equal_geom ::=::,::geom=point.gcat(geom());
  17. out geom;
  18. compare()(
  19. make marker after=n.set(id());out;
  20. );
  21. node(2003)->.n;
  22. .n convert equal_geom ::=::;
  23. out geom;
  24. .n convert equal_geom ::=::,::geom=pt(48,11);
  25. out geom;
  26. .n convert equal_geom ::=::,::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001));
  27. out geom;
  28. .n convert equal_geom ::=::,::geom=poly(lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001)));
  29. out geom;
  30. .n convert equal_geom ::=::,::geom=point.gcat(geom());
  31. out geom;
  32. compare()(
  33. make marker after=n.set(id());out;
  34. );
  35. node(2004)->.n;
  36. .n convert equal_geom ::=::;
  37. out geom;
  38. .n convert equal_geom ::=::,::geom=pt(48,11);
  39. out geom;
  40. .n convert equal_geom ::=::,::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001));
  41. out geom;
  42. .n convert equal_geom ::=::,::geom=poly(lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001)));
  43. out geom;
  44. .n convert equal_geom ::=::,::geom=point.gcat(geom());
  45. out geom;
  46. compare()(
  47. make marker after=n.set(id());out;
  48. );
  49. node(2005)->.n;
  50. .n convert equal_geom ::=::;
  51. out geom;
  52. .n convert equal_geom ::=::,::geom=pt(48,11);
  53. out geom;
  54. .n convert equal_geom ::=::,::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001));
  55. out geom;
  56. .n convert equal_geom ::=::,::geom=poly(lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001)));
  57. out geom;
  58. .n convert equal_geom ::=::,::geom=point.gcat(geom());
  59. out geom;
  60. compare()(
  61. make marker after=n.set(id());out;
  62. );
  63. (
  64. make point ::geom=pt(48.1,11.004);
  65. make point ::geom=pt(48.1,11.0055);
  66. make point ::geom=pt(48.1,11.006);
  67. )->.point_bis;
  68. node(2500)->.n;
  69. if (n.count(nodes) == 1)
  70. (
  71. make equal_tags tag="no_geom"->.no_geom;
  72. make equal_tags tag="center",::geom=pt(48,12.004)->.center;
  73. make equal_tags tag="comp_vs_vertex",::geom=point.gcat(geom())->.comp_vs_vertex;
  74. make equal_tags tag="comp_equal",::geom=point.gcat(geom())->.comp_equal;
  75. make equal_tags tag="comp_vertex_diff",::geom=point.gcat(geom())->.comp_vertex_diff;
  76. make equal_tags tag="link_equal",::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001))->.link_equal;
  77. make equal_tags tag="link_last_diff",::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48.0005,10.9999))->.link_last_diff;
  78. make equal_tags tag="link_first_diff",::geom=lstr(pt(48.0005,11.0001),pt(48.001,11),pt(48,11.001))->.link_first_diff;
  79. make equal_tags tag="link_middle_diff",::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001))->.link_middle_diff;
  80. make equal_tags tag="poly_equal_1",::geom=poly(lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)))->.poly_equal_1;
  81. make equal_tags tag="poly_equal_2",::geom=poly(
  82. lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)),
  83. lstr(pt(48,13),pt(48,13.001),pt(48.001,13.001)))->.poly_equal_2;
  84. make equal_tags tag="poly_diff_1",::geom=poly(
  85. lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)),
  86. lstr(pt(48,13),pt(48,13.001),pt(48.001,13.001)))->.poly_diff_1;
  87. make equal_tags tag="poly_diff_2",::geom=poly(
  88. lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)),
  89. lstr(pt(48,13),pt(48,13.001),pt(48.001,13.001)))->.poly_diff_2;
  90. );
  91. if (n.count(nodes) == 0)
  92. (
  93. make equal_tags tag="no_geom",::geom=pt(48,12)->.no_geom;
  94. make equal_tags tag="center",::geom=pt(48,12.006)->.center;
  95. make equal_tags tag="comp_vs_vertex",::geom=center(point.gcat(geom()))->.comp_vs_vertex;
  96. make equal_tags tag="comp_equal",::geom=point.gcat(geom())->.comp_equal;
  97. make equal_tags tag="comp_vertex_diff",::geom=point_bis.gcat(geom())->.comp_vertex_diff;
  98. make equal_tags tag="link_equal",::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48,11.001))->.link_equal;
  99. make equal_tags tag="link_last_diff",::geom=lstr(pt(48,10.999),pt(48.001,11),pt(48.0006,10.9999))->.link_last_diff;
  100. make equal_tags tag="link_first_diff",::geom=lstr(pt(48.0006,11.0001),pt(48.001,11),pt(48,11.001))->.link_first_diff;
  101. make equal_tags tag="link_middle_diff",::geom=lstr(pt(48,10.999),pt(48.001,11.0001),pt(48,11.001))->.link_middle_diff;
  102. make equal_tags tag="poly_equal_1",::geom=poly(lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)))->.poly_equal_1;
  103. make equal_tags tag="poly_equal_2",::geom=poly(
  104. lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)),
  105. lstr(pt(48,13),pt(48,13.001),pt(48.001,13.001)))->.poly_equal_2;
  106. make equal_tags tag="poly_diff_1",::geom=poly(
  107. lstr(pt(48,12),pt(48.0001,12.001),pt(48.001,12.001)),
  108. lstr(pt(48,13),pt(48,13.001),pt(48.001,13.001)))->.poly_diff_1;
  109. make equal_tags tag="poly_diff_2",::geom=poly(
  110. lstr(pt(48,12),pt(48,12.001),pt(48.001,12.001)),
  111. lstr(pt(48,13),pt(48.0001,13.001),pt(48.001,13.001)))->.poly_diff_2;
  112. );
  113. .no_geom out geom;
  114. .center out geom;
  115. .comp_vs_vertex out geom;
  116. .comp_equal out geom;
  117. .comp_vertex_diff out geom;
  118. .link_equal out geom;
  119. .link_last_diff out geom;
  120. .link_first_diff out geom;
  121. .link_middle_diff out geom;
  122. .poly_equal_1 out geom;
  123. .poly_equal_2 out geom;
  124. .poly_diff_1 out geom;
  125. .poly_diff_2 out geom;