— In contrast to the traditional wireless sensor network (WSN) applications that perform only data collection and aggregation, new generation of information processing applications, such as pursuit-evasion games, tracking, evacuation, and disaster relief applications, require in-network information storage and querying. Due to the network dynamics that are typical of WSNs, it is challenging to implement in-network information storage and querying in a resilient, energy-efficient, and distributed manner. To address these challenges, we exploit location information and geometry of the network and present an in-network querying infrastructure, namely distributed quad-tree (DQT) structure. DQT satisfies efficient in-network information storage as well as distance-sensitive querying: the cost of answering a query for an event is at most a constant factor (in our case 22 ) of the distance “d” to the nearest event in the network. In addition, DQT can handle range query and complex query...