  In this thesis, we introduce a novel formal framework to represent and reason
about qualitative direction and distance relations between extended objects
using Answer Set Programming (ASP). We take Cardinal Directional Calculus (CDC)
as a starting point and extend CDC with new sorts of constraints which involve
defaults, preferences and negation. We call this extended version as nCDC. Then
we further extend nCDC by augmenting qualitative distance relation and name
this extension as nCDC+. For CDC, nCDC, nCDC+, we introduce an ASP-based
general framework to solve consistency checking problems, address composition
and inversion of qualitative spatial relations, infer unknown or missing
relations between objects, and find a suitable configuration of objects which
fulfills a given inquiry.
