Skip to content

Commit ca84c49

Browse files
author
Yiannis Gatsoulis
committed
Merge branch 'master' into rcc4
2 parents 15721f1 + 031974c commit ca84c49

File tree

10 files changed

+55
-63
lines changed

10 files changed

+55
-63
lines changed

docs/rsts/handwritten/qsrs/qsrs.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Supported QSRs
1313
qtccs
1414
qtcbcs
1515
rcc2
16-
rcc3
16+
rcc4
1717
rcc5
1818
rcc8
1919

@@ -27,7 +27,7 @@ Currently, the following QSRs are supported:
2727
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
2828
| **argprobd** | Qualitative Argument Probabilistic Distances | :doc:`descr. <argprobd>` \| :mod:`api <qsrlib_qsrs.qsr_arg_prob_relations_distance>` | ? |
2929
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
30-
| **cardir** | Cardinal Directions | :doc:`descr. <cardir>` \| :mod:`api <qsrlib_qsrs.qsr_cardinal_direction_bounding_boxes_centroid_2d>` | [1]_ |
30+
| **cardir** | Cardinal Directions | :doc:`descr. <cardir>` \| :mod:`api <qsrlib_qsrs.qsr_cardinal_direction>` | [1]_ |
3131
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
3232
| **mos** | Moving or Stationary | :doc:`descr. <mos>` \| :mod:`api <qsrlib_qsrs.qsr_moving_or_stationary>` | |
3333
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
@@ -39,13 +39,13 @@ Currently, the following QSRs are supported:
3939
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
4040
| **qtcbcs** | Qualitative Trajectory Calculus *bc* Simplified | :doc:`descr. <qtcbcs>` \| :mod:`api <qsrlib_qsrs.qsr_qtc_bc_simplified>` | ? |
4141
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
42-
| **rcc2** | Region Connection Calculus 2 | :doc:`descr. <rcc2>` \| :mod:`api <qsrlib_qsrs.qsr_rcc2_rectangle_bounding_boxes_2d>` | [2]_ [3]_ |
42+
| **rcc2** | Region Connection Calculus 2 | :doc:`descr. <rcc2>` \| :mod:`api <qsrlib_qsrs.qsr_rcc2>` | [2]_ [3]_ |
4343
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
44-
| **rcc4** | Region Connection Calculus 4 | :doc:`descr. <rcc4>` \| :mod:`api <qsrlib_qsrs.qsr_rcc4 >` | [2]_ [3]_ |
44+
| **rcc4** | Region Connection Calculus 4 | :doc:`descr. <rcc4>` \| :mod:`api <qsrlib_qsrs.qsr_rcc4>` | [2]_ [3]_ |
4545
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
46-
| **rcc5** | Region Connection Calculus 5 | :doc:`descr. <rcc5>` \| :mod:`api <qsrlib_qsrs.qsr_rcc5_rectangle_bounding_boxes_2d>` | [2]_ [3]_ |
46+
| **rcc5** | Region Connection Calculus 5 | :doc:`descr. <rcc5>` \| :mod:`api <qsrlib_qsrs.qsr_rcc5>` | [2]_ [3]_ |
4747
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
48-
| **rcc8** | Region Connection Calculus 8 | :doc:`descr. <rcc8>` \| :mod:`api <qsrlib_qsrs.qsr_rcc8_rectangle_bounding_boxes_2d>` | [2]_ [3]_ |
48+
| **rcc8** | Region Connection Calculus 8 | :doc:`descr. <rcc8>` \| :mod:`api <qsrlib_qsrs.qsr_rcc8>` | [2]_ [3]_ |
4949
+----------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------+
5050

5151

docs/rsts/handwritten/qsrs/rcc2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ All the possible RCC5 relations between a blue object X and a red object Y are:
6060
API
6161
---
6262

63-
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc2_rectangle_bounding_boxes_2d>`.
63+
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc2>`.
6464

6565

6666
References

docs/rsts/handwritten/qsrs/rcc4.rst

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1+
12
Region Connection Calculus 4
23
============================
34

45
The Region Connection Calculus (RCC) [1]_ [2]_ is intended to serve for qualitative spatial representation and reasoning.
56
RCC abstractly describes regions (in Euclidean space, or in a topological space) by their possible relations to
67
each other.
78

8-
RCC5 consists of 5 basic relations that are possible between two regions; it is a stripped down version
9+
RCC4 consists of 4 basic relations that are possible between two regions; it is a stripped down version
910
of :doc:`RCC8 <rcc8>`. The mapping from RCC8 to RCC4 can be seen below:
1011

1112

1213
+------------+------------+
1314
| RCC8 | RCC4 +
1415
+============+============+
15-
| dc | dr |
16-
+------------+ +
17-
| ec | |
16+
| dc | dc |
1817
+------------+------------+
19-
| po | po |
18+
| ec | po |
19+
+------------+ +
20+
| po | |
2021
+------------+------------+
21-
| tpp | pp |
22+
| tpp | pp |
2223
+------------+ +
2324
| ntpp | |
25+
+------------+ +
26+
| eq | |
2427
+------------+------------+
25-
| eq | eq |
26-
+------------+------------+
27-
| tppi | ppi |
28+
| tppi | ppi |
2829
+------------+ +
2930
| ntppi | |
3031
+------------+------------+
@@ -33,22 +34,22 @@ of :doc:`RCC8 <rcc8>`. The mapping from RCC8 to RCC4 can be seen below:
3334
Relations
3435
---------
3536

36-
All the possible RCC5 relations between a blue object X and a red object Y are:
37+
All the possible RCC4 relations between a blue object X and a red object Y are:
3738

3839
+-------------------+------------------------------------------------+-------------------------------------------------+
3940
| Relation | Illustration | Interpretation +
4041
+===================+================================================+=================================================+
41-
| X **dr** Y | .. image:: ../images/rcc8_dc.png | X is discrete from Y. |
42-
+ +------------------------------------------------+ +
43-
| | .. image:: ../images/rcc8_ec.png | |
42+
| X **dc** Y | .. image:: ../images/rcc8_dc.png | X is disconnected from Y. |
4443
+-------------------+------------------------------------------------+-------------------------------------------------+
45-
| X **po** Y | .. image:: ../images/rcc8_po.png | X is partially overlapping Y. |
44+
| X **po** Y | .. image:: ../images/rcc8_ec.png | X is partially overlapping Y. |
45+
+ +------------------------------------------------+ +
46+
| | .. image:: ../images/rcc8_po.png | |
4647
+-------------------+------------------------------------------------+-------------------------------------------------+
4748
| X **pp** Y | .. image:: ../images/rcc8_tpp.png | X is a proper part of Y. |
4849
+ +------------------------------------------------+ +
4950
| | .. image:: ../images/rcc8_ntpp.png | |
50-
+-------------------+------------------------------------------------+-------------------------------------------------+
51-
| X **eq** Y | .. image:: ../images/rcc8_eq.png | X is equal to Y. |
51+
+ +------------------------------------------------+ +
52+
| | .. image:: ../images/rcc8_eq.png | |
5253
+-------------------+------------------------------------------------+-------------------------------------------------+
5354
| X **ppi** Y | .. image:: ../images/rcc8_tppi.png | X is a proper part inverse of Y. |
5455
+ +------------------------------------------------+ +
@@ -59,7 +60,7 @@ All the possible RCC5 relations between a blue object X and a red object Y are:
5960
API
6061
---
6162

62-
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc5_rectangle_bounding_boxes_2d>`.
63+
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc4>`.
6364

6465

6566
References

docs/rsts/handwritten/qsrs/rcc5.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ of :doc:`RCC8 <rcc8>`. The mapping from RCC8 to RCC5 can be seen below:
1212
+------------+------------+
1313
| RCC8 | RCC5 +
1414
+============+============+
15-
| dc | dc |
16-
+------------+------------+
17-
| ec | po |
15+
| dc | dr |
1816
+------------+ +
19-
| po | |
17+
| ec | |
18+
+------------+------------+
19+
| po | po |
2020
+------------+------------+
2121
| tpp | pp |
2222
+------------+ +
2323
| ntpp | |
24-
+------------+ +
25-
| eq | |
2624
+------------+------------+
27-
| tppi | ppi |
25+
| eq | eq |
26+
+------------+------------+
27+
| tppi | ppi |
2828
+------------+ +
2929
| ntppi | |
3030
+------------+------------+
@@ -38,17 +38,17 @@ All the possible RCC5 relations between a blue object X and a red object Y are:
3838
+-------------------+------------------------------------------------+-------------------------------------------------+
3939
| Relation | Illustration | Interpretation +
4040
+===================+================================================+=================================================+
41-
| X **dr** Y | .. image:: ../images/rcc8_dc.png | X is disconnected from Y. |
42-
+-------------------+------------------------------------------------+-------------------------------------------------+
43-
| X **po** Y | .. image:: ../images/rcc8_ec.png | X is partially overlapping Y. |
41+
| X **dr** Y | .. image:: ../images/rcc8_dc.png | X is discrete from Y. |
4442
+ +------------------------------------------------+ +
45-
| | .. image:: ../images/rcc8_po.png | |
43+
| | .. image:: ../images/rcc8_ec.png | |
44+
+-------------------+------------------------------------------------+-------------------------------------------------+
45+
| X **po** Y | .. image:: ../images/rcc8_po.png | X is partially overlapping Y. |
4646
+-------------------+------------------------------------------------+-------------------------------------------------+
4747
| X **pp** Y | .. image:: ../images/rcc8_tpp.png | X is a proper part of Y. |
4848
+ +------------------------------------------------+ +
4949
| | .. image:: ../images/rcc8_ntpp.png | |
50-
+ +------------------------------------------------+ +
51-
| | .. image:: ../images/rcc8_eq.png | |
50+
+-------------------+------------------------------------------------+-------------------------------------------------+
51+
| X **eq** Y | .. image:: ../images/rcc8_eq.png | X is equal to Y. |
5252
+-------------------+------------------------------------------------+-------------------------------------------------+
5353
| X **ppi** Y | .. image:: ../images/rcc8_tppi.png | X is a proper part inverse of Y. |
5454
+ +------------------------------------------------+ +
@@ -59,7 +59,7 @@ All the possible RCC5 relations between a blue object X and a red object Y are:
5959
API
6060
---
6161

62-
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc4>`.
62+
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc5>`.
6363

6464

6565
References

docs/rsts/handwritten/qsrs/rcc8.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ All the possible RCC8 relations between a blue object X and a red object Y are:
3636
API
3737
---
3838

39-
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc8_rectangle_bounding_boxes_2d>`.
39+
The API can be found :mod:`here <qsrlib_qsrs.qsr_rcc8>`.
4040

4141
References
4242
----------

qsr_lib/src/qsrlib_qsrs/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from qsr_rcc2_rectangle_bounding_boxes_2d import QSR_RCC2_Rectangle_Bounding_Boxes_2D
1+
from qsr_rcc2 import QSR_RCC2
22
from qsr_rcc3_rectangle_bounding_boxes_2d import QSR_RCC3_Rectangle_Bounding_Boxes_2D
33
from qsr_rcc4 import QSR_RCC4
4-
from qsr_rcc8_rectangle_bounding_boxes_2d import QSR_RCC8_Rectangle_Bounding_Boxes_2D
5-
from qsr_cardinal_direction_bounding_boxes_centroid_2d import QSR_Cardinal_Direction_Bounding_Boxes_Centroid_2D
4+
from qsr_rcc8 import QSR_RCC8
5+
from qsr_cardinal_direction import QSR_Cardinal_Direction
66
from qsr_qtc_b_simplified import QSR_QTC_B_Simplified
77
from qsr_qtc_c_simplified import QSR_QTC_C_Simplified
88
from qsr_qtc_bc_simplified import QSR_QTC_BC_Simplified
@@ -12,11 +12,11 @@
1212
from qsr_new_mwe import QSR_MWE
1313

1414
# register new qsrs by class name below
15-
qsrs_registry = (QSR_RCC2_Rectangle_Bounding_Boxes_2D,
15+
qsrs_registry = (QSR_RCC2,
1616
QSR_RCC3_Rectangle_Bounding_Boxes_2D,
1717
QSR_RCC4,
18-
QSR_RCC8_Rectangle_Bounding_Boxes_2D,
19-
QSR_Cardinal_Direction_Bounding_Boxes_Centroid_2D,
18+
QSR_RCC8,
19+
QSR_Cardinal_Direction,
2020
QSR_QTC_B_Simplified,
2121
QSR_QTC_C_Simplified,
2222
QSR_QTC_BC_Simplified,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from qsrlib_qsrs.qsr_dyadic_abstractclass import QSR_Dyadic_1t_Abstractclass
44
import math
55

6-
class QSR_Cardinal_Direction_Bounding_Boxes_Centroid_2D(QSR_Dyadic_1t_Abstractclass):
6+
class QSR_Cardinal_Direction(QSR_Dyadic_1t_Abstractclass):
77
"""Cardinal direction relations.
88
99
Values of the abstract properties
@@ -25,7 +25,7 @@ class QSR_Cardinal_Direction_Bounding_Boxes_Centroid_2D(QSR_Dyadic_1t_Abstractcl
2525

2626
def __init__(self):
2727
"""Constructor."""
28-
super(QSR_Cardinal_Direction_Bounding_Boxes_Centroid_2D, self).__init__()
28+
super(QSR_Cardinal_Direction, self).__init__()
2929

3030
def _compute_qsr(self, data1, data2, qsr_params, **kwargs):
3131
"""Compute QSR relation.

qsr_lib/src/qsrlib_qsrs/qsr_rcc2_rectangle_bounding_boxes_2d.py renamed to qsr_lib/src/qsrlib_qsrs/qsr_rcc2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from qsrlib_qsrs.qsr_rcc_abstractclass import QSR_RCC_Abstractclass
44

55

6-
class QSR_RCC2_Rectangle_Bounding_Boxes_2D(QSR_RCC_Abstractclass):
6+
class QSR_RCC2(QSR_RCC_Abstractclass):
77
"""RCC2 relations.
88
99
Values of the abstract properties
@@ -22,7 +22,7 @@ class QSR_RCC2_Rectangle_Bounding_Boxes_2D(QSR_RCC_Abstractclass):
2222

2323
def __init__(self):
2424
"""Constructor."""
25-
super(QSR_RCC2_Rectangle_Bounding_Boxes_2D, self).__init__()
25+
super(QSR_RCC2, self).__init__()
2626

2727
def _convert_to_requested_rcc_type(self, qsr):
2828
"""Remap QSR values from RCC8 to RCC2.

qsr_lib/src/qsrlib_qsrs/qsr_rcc3_rectangle_bounding_boxes_2d.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
class QSR_RCC3_Rectangle_Bounding_Boxes_2D(QSR_RCC_Abstractclass):
77
"""RCC3 relations.
88
9+
.. warning::
10+
RCC3 is deprecated. Use RCC4 instead.
11+
912
Values of the abstract properties
1013
* **_unique_id** = "rcc3"
1114
* **_all_possible_relations** = ("dc", "po", "o")

qsr_lib/src/qsrlib_qsrs/qsr_rcc8_rectangle_bounding_boxes_2d.py renamed to qsr_lib/src/qsrlib_qsrs/qsr_rcc8.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from qsrlib_qsrs.qsr_rcc_abstractclass import QSR_RCC_Abstractclass
44

55

6-
class QSR_RCC8_Rectangle_Bounding_Boxes_2D(QSR_RCC_Abstractclass):
6+
class QSR_RCC8(QSR_RCC_Abstractclass):
77
"""RCC8 relations.
88
99
Values of the abstract properties
@@ -14,18 +14,6 @@ class QSR_RCC8_Rectangle_Bounding_Boxes_2D(QSR_RCC_Abstractclass):
1414
.. seealso:: For further details about RCC8, refer to its :doc:`description. <../handwritten/qsrs/rcc8>`
1515
"""
1616

17-
"""RCC8
18-
19-
# 'dc' bb1 is disconnected from bb2
20-
# 'ec' bb1 is externally connected with bb2
21-
# 'po' bb1 partially overlaps bb2
22-
# 'eq' bb1 equals bb2
23-
# 'tpp' bb1 is a tangential proper part of bb2
24-
# 'ntpp' bb1 is a non-tangential proper part of bb2
25-
# 'tppi' bb2 is a tangential proper part of bb1
26-
# 'ntppi' bb2 is a non-tangential proper part of bb1
27-
"""
28-
2917
_unique_id = "rcc8"
3018
"""str: Unique identifier name of the QSR."""
3119

@@ -34,7 +22,7 @@ class QSR_RCC8_Rectangle_Bounding_Boxes_2D(QSR_RCC_Abstractclass):
3422

3523
def __init__(self):
3624
"""Constructor."""
37-
super(QSR_RCC8_Rectangle_Bounding_Boxes_2D, self).__init__()
25+
super(QSR_RCC8, self).__init__()
3826

3927
def _convert_to_requested_rcc_type(self, qsr):
4028
"""No need for remapping.

0 commit comments

Comments
 (0)