# Geo-DMP: A DTN-Based Mobile Prototype for Geospatial Data Retrieval
## 3 Geo-DMP Mobile System
### The Routing Scheme Based on Map Segmentation and Movement History
So we presume that all of the moving nodes have strong regularity, i.e., they move along their predefined routes back and forth just like buses or trans. Based on this premise, the history regions across which a node has moved are limited and the node will certainly revisit these regions at least several times. As mentioned earlier, an outstanding feature of the administrative subdivision method is that it can surround the daily activities of people's lives, i.e., one will stay or move about within one singleregion for a long stretch of time. Therefore, it is reasonable that we make the assumption that the requester will not leave the community region where it sends out the query bundles. As a result, once a query bundle triggers the generation of a response bundle, the target regions of this response bundle can be set to the source regions of that query bundle. With reference to the target regions of the query bundle, as the query bundle is probably satisfied by intermediate caches during the forwarding process, they are not meant for the place to which it must be delivered but just suggest where the demanded content could definitely be found as a last resort. Here they are set to the location where the RSU resides. How to intelligently determine the appropriate target regions by DTN itself is another of our intriguing research problems. For the sake of brevity, in the following description of routing strategy, the forwarding process of a query bundle is taken as the example. The same goes for a new response bundle. The query bundles are forwarded in a single-copy fashion. We suppose that a query bundle \(B\) is created on node \(N_{a}\), whose destination regions are \(r_{1}/r_{2}/r_{3}\) in a top-down view where the subscript indicates the level. \(N_{a}\) makes its decision on whether it should forward bundle \(B\) to one of its neighbors according to Algorithm 1. For a concise expression of the algorithm, we denote \(R=\{r_{i}\mid i=1,2,3\}\), and \(N_{c}\) as the current best candidate node for next hop and its initial state is set to local node \(N_{a}\). Then each neighbor \(N_{i}\) is compared concerning the relation between visited regions and target regions. The comparison result can be categorized into several cases:  
**Case I**: Neither \(N_{c}\) nor \(N_{i}\) has visited any regions in \(R\) (lines 9-16)  
We notice that, within a period of time after the creation of bundles, the source node may scarcely be able to meet eligible next hop due to the long distance away from the target regions or because most nodes have not accumulated enough knowledge about their movement pattern at the early stage of the experiment. To mitigate the influence of this cold-start problem, the first task is to make bundles start to move towards the right direction as soon as possible. So in this case, we measure the distance between the regions they have been to (\(V_{c}\) and \(V_{i}\)) and the smallest target region \(r_{3}\). The distance between two regions is defined as the straight-line distance between the two centroids of them. As the purpose of these measurements is to roughly determine which one is more likely to move on the right direction, a small number of simple calculations is enough. If one node has traveled across many regions already, calculations can be confined to history regions in a single layer. Such elasticity is easy to achieve according to the length of region ID. The \(N_{i}\) will become new \(N_{c}\) if it has the minimum distance. **Case II**: Either \(N_{c}\) or \(N_{i}\) has visited the region(s) in \(R\) (lines 17-20)  
In this case, one side has evidence that it has been to at least one region in \(R\) while the other side does not. Thus, obviously the one whose known trajectory goes through the target regions should be selected as the bundle keeper as it is more likely that it will bring the bundle there.