Location modeling and representation are crucial technologies for context-aware applications. In this paper, we present a
novel location model combining the virtues of both the hierarchical and coordinate location models, and we introduce a computable
location identifier, namely Aura Location Identifier (ALI). We then describe how the Aura space service uses this hybrid model to handle spatial queries for context-aware applications.
A simple example of such a query is a range query, e.g. “select name from printer where distance(location, ‘ali://cmu/wean-hall/floor3/3100-corridor#(10,10,0)’) <10”, where “location” is an attribute representing the location of printers. Finally, we discuss how we extended the PostgreSQL
database system to provide direct support for spatial SQL queries at the database level. These extensions improve performance
and increase flexibility for context-aware applications.