Research Article

Qualitative Spatial Reasoning with Directional and Topological Relations

Algorithm 1

Algorithm for spatial reasoning.
(1)      require   a set of defined relations
(2)      ensure   consistent then true; else false
(3)      if   =   then
(4)              return true
(5)      ←inverseComplete()
(6)      ←equalsComplete()
(7)      for     do
(8)              if  !isPathConsistent(, )  then
(9)                      return  false
(10)            if  !isCrossConsistent(, ) then
(11)                     return  false
(12)    return  true