1.1 About Spatial Mining
1.1 About Spatial Mining
The search service on the internet is usually done by providing the popularity of keyword in applications such as Google earth and yahoo maps. In these applications, the spatial information of objects is provided to the user by list of keywords. The queries on spatial objects combined with textual information are represented by set of keywords, called spatial keyword queries. Here we study a new type of spatial keyword query called Aggregate Nearest Keyword (ANK) query. A user may want to rank a set of locations with respect to the sum of distances to nearest interested facilities. Given a set of data points D, query object Q and query keyword m, an ANK query is implemented to obtain a minimum sum of distances to its nearest points in D. Each nearest point obtained matches at least one of the query keywords m. For processing this query several algorithms are proposed. The processing of ANK query consists of Probing algorithm, Hierarchical Join Algorithm. In order to prune large portion of query objects reducing the number of node accesses, this extensive experiments on spatial databases is effective in reducing ANK query response time which exhibits good scalability with the query objects and the number of query keywords.
Spatial data mining is the process of discovering interesting and previously unknown, but potentially useful patterns from large spatial datasets. Extracting interesting and useful patterns from spatial datasets is more difficult than extracting the corresponding patterns from traditional numeric and categorical data due to the complexity of spatial data types, spatial relationships, and spatial autocorrelation. Spatial data is about instances located in a physical space. When spatial information becomes dominant interest, spatial data mining should be applied. Spatial data structures can facilitate spatial mining. Standard data mining algorithms can be modified for spatial data mining, with a substantial part of preprocessing to take into account of spatial information.
1.2 ABOUT NEAREST KEYWORD SEARCH Nearest neighbor search (NNS), also known as proximity search, similarity search or closest point search, is an optimization problem for finding closest points in metric spaces. The problem is: given a set S of points in a metric space M and a query point q M, find the closest point in S to q. In metric space, there is a valid concept of distance between points. If we treat two features as points in space, we can determine the distance between them. The lesser the distance between them, the more similar they are in appearance.
CHAPTER 2 REVIEW OF LITERATURE 2.1 EXISTING SYSTEM Most traditional spatial queries on spatial databases such as nearest neighbor queries, range queries, do not concern non-spatial information. For Example: In range query, a common database operation that retrieves all records where some value is between an upper and lower boundary. listing all employees with 3 to 5 years experience is done by a range query Which is unusual because it is not generally known in advance how many entries a range query will return, or if it will return any at all. In nearest neighbor queries, an optimization problem is evaluated for finding the closest points in metric spaces .Given a set S of points in a metric space M and a query point q M, finding the closest point in S to q. The informal observation usually referred to as the curse of dimensionality states that there is no general-purpose exact solution for NNS in high-dimensional Euclidean space using polynomial preprocessing and poly logarithmic search time. 2.2 LITERATURE SURVEY 2.2.1 RANGE NEAREST-NEIGHBOR QUERY A range nearest-neighbor (RNN) query retrieves the nearest neighbor (NN) for every point in a range. In this paper, we consider the ranges as (hyper) rectangles and propose efficient in-memory processing and secondary memory pruning techniques for RNN queries in both 2D and high-dimensional spaces. These techniques are generalized for kRNN queries, which return the k nearest neighbors for every point in the range. This paper focuses on RNN query processing techniques. In general, processing an NN query on a spatial index involves two interleaving phases: secondary memory pruning of distant index nodes & In-memory computation of the nearest neighbors.
2.2.2 LOCATION-BASED INSTANT SEARCH In this paper, location-based instant search that combines location based keyword search with instant search is formulated. Initially the filtering-effective hybrid index (FEH) is evaluated. Then development of indexing and search techniques are utilized for the FEH index and store prefix information to efficiently answer instant queries. We first present an index structure called filtering-effective hybrid (FEH) index. It judiciously uses two types of keyword filters in a node of a spatial tree based on the selectiveness of each keyword. One filter, called child filter, maps keywords and their corresponding children nodes. Another Filter, called object filter, maps keywords to their corresponding records in the sub tree of the node. During a traversal of the FEH index tree, the object filter at each node allows us to directly retrieve records for these keywords in the filter, thus bypassing those intermediate nodes in the sub tree. Next is to find answers to a query as the user is typing the keywords character by character. Existing index techniques are utilized and queries are answered using FEH. 2.3 RELATED WORK Nearest neighbor (NN) queries on a spatial database is a classical problem. The existing algorithms for point NN queries using R-trees follow the branch-and-bound paradigm, utilizing lower and upper bounding functions to prune the search space. The kNN algorithm for R-trees traverses an R-tree while maintaining a list of k potential nearest neighbors in a priority queue in a Depth-First (DF) manner. The DF algorithm is sub-optimal, i.e., it accesses more nodes than necessary. The Best-First (BF) algorithm achieves the optimal I/O performance by maintaining a heap with the entries visited so far, sorted by their mindist. DF can be more I/O consuming than BF. However, DF requires only bounded memory and at most a single tree path resides in memory during search. The closest pair queries (CPQ) are a combination of spatial join and nearest neighbor queries, which find the pair with the minimum distance among all pairs from two data sets. The difference between nearest neighbor queries and closest pair queries is that the algorithms of the latter access two index structures (one for each data set) and utilize the distance function of the two intermediate nodes to prune the pairs.
4
Internal Node 10011001 01001011 -41.1, 139.4 35.5,174.4 01101101 10010011 39.5, 0.5 51.3,116.2
Data Node 00011001 01001011 -41.1, 174.4 -41.1, 174.4 10011001 00001010 35.5, 139.4 35.5, 139.4
Data Node 01100101 10000011 51.3, 0.5 51.3, 0.5 00001001 10010010 39.5, 116.2 39.5, 116.2
Figure 1: Example of IR2-Tree The figure shows an internal node and two data nodes of an IR2-Tree. Each node of IR2-Tree contains both spatial and keyword information. If there are n keywords in the database, keywords for each node can be represented using a bitmap of size n, with 1 indicating its existence in the node and a 0 otherwise. This representation incurs little storage overhead. Moreover, it can accelerate the checking process of keyword constraints due to the relatively high speed of binary operations. NNK specifies only one query location and CPQ query specifies a set of query locations. RK and NNK both require the qualified points, and must contain all query keywords.CPQ query just requests that the data point contains at least one query keyword.
CHAPTER 3 EXPERIMENTAL METHODS 3.1 EXPERIMENTAL SETUP Back end setup We have created two tables such as Coimbatore and graph, and included these tables in a same database in the distributed system. Front end setup Our experiment on ANK Query was implemented by the universe of objects in the database, which is created in a standard environment visual studio 2008 with framework 3.5 by the language of vb.net. The experiments were conducted using Top-k spatial keyword Query with its minimized distance: sum of the nearest keyword features with respect to the input query object. Probing Algorithm The records in the database consist of feature, category, place, latitude and longitude. Initially, the data is fetched from the database for record matching. Next, the records of input object matches with its nearest features. Then the minimized distance of the input object with respect to its nearest features are calculated which is then followed by the calculation of summed distance and will be displayed in the sorted manner. Hierarchical Join Algorithm The records in the database consist of feature, category, place, latitude, longitude and index. Based on the index, clustering is done and the data is fetched from the database for record matching. Next, the records of input object matches with its nearest features. Then the minimized distance of the input object with respect to its nearest features are calculated which is then followed by the calculation of summed distance and will be displayed in the sorted manner.
3.2 EVALUATION The directed way to obtain the summed distance of q in probing algorithm is to incrementally retrieve its nearest neighbors until all query keywords appear. During the output of nearest neighbors, we can get the distance of every nearest keyword through modifying the function IR2NearestNeighbor. Since the experiments show that it is more expensive, we adopt the method used in PA. PA however has a significant drawback. It requires to compute the summed distance of every query point q in Q, which in turn incurs multiple accesses to the same node of RD and results in a large number of index and data accesses. Therefore the implementation of hierarchical join algorithm is carried out. The function HJ is called recursively which is followed by a Depth-First searching strategy. When the algorithm is called for a data node of RQ on one hand and an internal node in RD on the other hand, downwards propagation stops in RQ while propagation in RD continues, and vice versa. When qNode and the nodes pointed by entries in EL is both data node, we calculate the nearest keyword wi in Qw of every query point in qNode and get the summed distance sumdist. Wk and will be updated when sumdist is less than which shows that the HJ algorithm is non-incremental, i.e., the user can not have any output until the whole algorithm terminates. In summary, the best algorithm for ANK queries depends on both the cardinality of query objects and the number of query keywords. When M is 10%, PA outperforms the HJ algorithm and when M is over 10% or M is larger than 1, HJ has the best performance and remarkable scalability.
3.3 HARDWARE SPECIFICATION Processor Ram Hard Disk : : : PENTIUM DUAL-CORE CPU 2 GB 300 GB
3.4 SOFTWARE SPECIFICATION Operating System Database GUI : : : WINDOWS XP MS OFFICE ACCESS 2007 VISUAL STUDIO .NET 2008
3.4.1 SOFTWARE DESCRIPTION 3.4.1.1 KEY BENEFITS OF .NET Ease of Use .NET and the .NET Framework are overflowing with features, offering functionality, ease of use, and production capabilities not available today. The .NET Framework everything is an object, and that coupled with the layout of the namespaces, the .NET Framework is easier to use than the existing, competing frameworks or class libraries. Ease of use increases productivity. Stability By automating memory management, Garbage collector eliminates one of the most common sources of system failures such as memory leak. The garbage collector also dramatically simplifies the development process by relieving the developer from the need to manually track memory use. Security .NET addresses software security on two fronts. First, the delegation of memory handling to the garbage collector defends against the illegal memory reference. This makes it virtually impossible for malignant code to reference memory that it does not own. Second, the .NET Framework offers a comprehensive security model enforced by the runtime. There are two primary security types: code access and role based. Deployment and Management The assembly makes version maintenance easier for both the development organization and corporate customer: .NET permits side-by-side deployment of
versions, and versions are self-contained, making updates, service fixes, and upgrades more manageable.
3.4.1.2 VISUAL BASIC .NET Visual Basic .NET provides the easiest, most productive language and tool for rapidly building Windows and Web applications. Visual Basic .NET comes with enhanced visual designers, increased application performance, and a powerful integrated development environment (IDE). It also supports creation of applications for wireless, Internet-enabled hand-held devices. 3.4.1.3 FEATURES OF VISUAL BASIC .NET Powerful Windows-based Applications It provides features of powerful new forms designer, an in-place menu editor, and automatic control anchoring and docking. Visual Basic .NET delivers new productivity features for building more robust applications easily and quickly. Building Web-based Applications With Visual Basic .NET we can create Web applications using the shared Web Forms Designer and the familiar "drag and drop" feature. We can also use IntelliSense technology and tag completion, or choose the WYSIWYG editor for visual authoring of interactive Web applications. Mobile Applications Visual Basic .NET 2003 and the .NET Framework 1.1 offer integrated support for developing mobile Web applications for more than 200 Internet-enabled mobile devices. These new features give developers a single, mobile Web interface and programming model to support a broad range of Web devices, including WML 1.1 for WAPenabled cellular phones, compact HTML (cHTML) for i-Mode phones, and HTML for Pocket PC, handheld devices, and pagers. 3.5 SYSTEM DEFINITION We define a spatial object p as a pair in the form (p.l, p.t), where p.l is a location descriptor in the multidimensional space, and p.t is the textual description represented by sets of keywords. Let D be the universe of all objects in the database. Given a group of query points Q = {q1, q2, . . . , qn} and a set of m query keywords Qw = {w1, w2, . . . , wm}. Atop-k spatial keyword query retrieves k query points from Q with the minimum
9
sum of distances. q Q, the nearest keyword w of q is a point pi (pi D) which contains keyword w such that pj D/pi and w pj .t, we have dist(pi, q) dist (pj, q).The function dist(q, pi) is the Euclidean distance between q and pi. We use function nearkey (q, w) to present the distance between q and its nearest keyword w. Then the summed distance of q is defined as nearkey(q,wi), where wi Qw. The ANK query
returns the k query points in Q with the minimum summed distance. Here each query point in Q only contains the spatial information. 3.6 SYSTEM OVERVIEW Here we propose an interesting special keyword query called Aggregate Nearest Keyword query. Given a set of data points D which contains keyword information, a group of query objects Q and m query keywords, a top-k ANK query retrieves k objects in Q with the minimum sum of distances to its nearest points in D such that each nearest point matches at least one of query keywords. It can be widely utilized in various decision support systems and multiple domains like service recommendation, investment planning, etc. For example, consider a spatial database D which manages facilities such as schools, restaurants and hospitals, represented by sets of keywords. A user wants to rank the locations with respect to the sum of distances to nearest interested facilities. The user may issue a set of locations and multiple query keywords representing his/her interested facilities, the result returns k best locations that minimize the summed distance to these facilities.
10
AN ILLUSTRATIVE EXAMPLE
0.9 0.4 0.6 School 0.2 q3 0.4 0.2 0.3 1.3 1.0 q2 0.3 0.3 Hospital Apartment Supermarket
Figure 2: TOP-K ANK QUERY The above figure gives out a clearer example of an ANK query. White points are apartments as query objects Q defined by a local resident. Gray points represent sample dataset of data points D with three keywords i.e., hospital, school and supermarket. The resident may be interested in the apartment q which minimizes the sum of distances to nearest hospital, school and supermarket. For instance, the distance between q1 and its nearest neighbor which includes keyword hospital is 0.5. The distance between q1 and its nearest school and supermarket is 0.4 and 0.3 respectively. The summed distance of q1 is (q1) = 0.5 + 0.4 + 0.3 = 1.2.Similarly, we obtain (q2) = 0.3 + 0.3 + 1.0 = 1.6 and (q3) = 0.2 + 0.4 + 1.3 = 1.9. (q1) is minimum and hence q1 is returned as the best result to the user. In this example, each gray point is associated with only one keyword. Actually a spatial object is associated with a set of keywords rather than one keyword in many real applications. Each point in D may be associated with multiple keywords. In this case, the nearest hospital and school of a query point may be the same point in D.
11
3.7 THE PROBING ALGORITHM It is an algorithm which computes the summed distance of every query object in Q. For each query point q, the distance-first is utilized. IR2-Tree algorithm is to compute the distance to its nearest keyword wi in Qw. Then, add the nearest distances and get the summed distance of q. At last, the query object with the minimum summed distance will be returned as the result. Algorithm 1: Probing Algorithm (PA) algorithm PA(Node: node of RQ) begin if Node is not data node then read the child node Nc of Node; PA( Nc ); for c = 1 to m do kwddistc = IR2NearestNeighbor(e, wc); currdist += kwddistc; if currdist then break; if currdist < then update Wk and ; end Algorithm 1 is the pseudo-code of Probing Algorithm (PA), which retrieves the query result by computing the summed distance of every query point in Q. Here the second parameter of the function IR2NearestNeighbor is only one keyword wc. The function IR2NearestNeighbor returns the distance between q and its nearest keyword wc, where q is a query point in a data node. Initially, the algorithm is invoked at the root node of RQ (Node = RQ.root). The procedure is recursively applied on tree nodes until a data node is reached. The function IR2NearestNeighbor is called repeatedly for computing the summed distance. In particular, the query entry e is pruned, as soon as its current summed distance for query keywords is already not smaller than , where presents the top-k distance found so far.
12
Wk is a max-heap which manages the top-k results. Wk and are updated when the last summed distance is less than . 3.8 THE HIERARCHICAL JOIN ALGORITHM Hierarchical join (HJ) algorithm is a branch-and-bound algorithm, which can significantly reduce the number of query objects and data points to be examined. The key idea is to compute the upper bound of the summed distance using metric function. Heuristic 1: Assume Nq is an internal node in RQ and Nlp is a set of all internal nodes at a certain level l in RD. Let minkey (Nq, wi) be the minimum MINDIST (Nq, Nlpi ) where Nlpi Nlp and Nlpi contains the query keyword wi. Then internal node Nq and its sub tree can be pruned if:
Algorithm 2: Hierarchical Join Algorithm (HJ) HJ (qNode: node of RQ, EL: a list of entries in RD) begin if EL is internal node then foreach entry qent of qNode do initial a new list of entries entlist; initial a new vector kmin[m]; foreach entry kent in EL do mmdist = MINDIST (qent, kent); if mmdist < then if EL is internal node then get the node kn pointed by kent; foreach entry e in kn do add e into entlist; else add kent into entlist; foreach wi in kent do
13
kmin[i]=min(mmdist, kmin[i]); if sum(kmin[1], . . ., kmin[m]) then continue; if entlist is not empty then if qNode is datanode then HJ (qNode, entlist); else foreach child node qn of qNode do HJ (qn, enList); else foreach query point q in qNode do calculate summed distance sumdist of q ; if sumdist < then update Wk and ; end Algorithm 2 is the pseudo-code of HJ algorithm. In which the candidate entries of nodes in the same level of RD are kept in a list EL. Initially all entries of root node of RD is inserted into EL and qNode is the root node of RQ. The function HJ is called recursively till all computations are completed. If the entries of EL are internal node or qNode is internal node, we compute the MINDIST between one entry qent of qNode and every entry kent in EL. If the MINDIST is less than , we add all entries of the node pointed by kent into a new list entlist. Otherwise, kent will be pruned. We utilize this condition to filter portion of nodes at the same level of RD. If the entlist is empty at last, the query node pointed by qent will be pruned because it cannot contribute to the final result. The value of minkey (kent, wi) is stored in the vector kmin as an element. The length of vector kmin is equal to the number of query keywords m. The value of minkey (kent, wi) (kmin[i]) is updated when kent contains wi and the MINDIST is smaller. When the MINDIST between qent and all entries in EL is computed, the kmin of qent is retrieved.
14
3.9 DATA FLOW DIAGRAM 3.9.1 PROBING ALGORITHM LEVEL 0 Distance of each feature Query
Finding minimum distance Sorting Result in ascending order the data
Query
15
Query
Clustered data
Tree
Data
Fetching data from database Interested neighbors Distance calculation
Query
Clustering
Tree formation
16
Fetching Data
Maximum
Distance
Maximum
Distance
Maximum
Not available
Search in local index Select index
Maximum Distance Finding Distance for interested feature 1 Minimum Distance Latching minimum distance
Maximum Distance Finding Distance for interested feature 2 Minimum Distance Latching minimum distance
Maximum Distance Finding Distance for interested feature 3 Minimum Distance Latching minimum distance
18
3.11 IMPLEMENTATION PROBING ALGORITHM The probing algorithm retrieves the query result by computing the summed distance of every query point in Q. Initially, the datas are fetched from the database. In the front end, the data (nearest features) corresponding to the input query object is fetched from the database. Next, the distance calculation takes place for the interested neighbors of the selected data. The minimum distance of the interested neighbor with respect to the input object is obtained. Then the summed distance of the neighbors are calculated, which is done by the sum of distances of the three nearest neighbors. It is given by, (q1) = q1.a + q1.b + q1.c (q2) = q2.a + q2.b + q2.c .. .. (qn) = qn.a + qn.b + qn.c Where, (q1) = summed distance of the input object q1. (q2) = summed distance of the input object q2. (qn) = summed distance of the input object qn. q.a q.b q.c = distance of 1st nearest feature of q. = distance of 2nd nearest feature of q. = distance of 3rd nearest feature of q.
The summed data is then sorted, so as to display the result of the object in the ascending order. The map overlay can be obtained with the input object, plotted to its nearest key features. The directed line in the map links the object to its key features, which is displayed in a small rectangle of differentiated colors. The individual map display can also be obtained for the separate interested object of the user which displays the directed line linked with object and its features with its measured metrics (kms) from the object.
19
HEIRARCHICAL JOIN ALGORITHM HJ algorithm computes the upper bound of the summed distance, which significantly reduces the number of query objects and the data points to be examined. The first step involves the method of clustering, i.e. grouping of similar data objects. The clustered data is developed to form a tree called as hierarchical tree which is then followed by fetching of data in the database. In the front end, based on the index, the data (nearest features) corresponding to the input query object is fetched from the database. Next, the distance calculation takes place for the interested neighbors of the selected data. The distance between each interested neighbor with respect to the input object is obtained. Then the summed distance of the neighbors are calculated which is done by the sum of distances of the three nearest neighbors. It is given by, (q1) = q1.a + q1.b + q1.c (q2) = q2.a + q2.b + q2.c .. .. (q2) = qn.a + qn.b + qn.c. Where, (q1) = summed distance of the input object q1. (q2) = summed distance of the input object q2. (qn) = summed distance of the input object qn. q.a q.b q.c = distance of 1st nearest feature of q. = distance of 2nd nearest feature of q. = distance of 3rd nearest feature of q.
The summed data is then sorted so as to display the result of the object in the ascending order. The map overlay can be obtained with the input object, plotted to its nearest key features. The directed line in the map links the object to its key features, which is displayed in a small rectangle of differentiated colors. The individual map display can also be obtained for the separate interested object of the user which displays the directed line linked with object and its features with its measured metrics (kms) from the object.
20
After the calculation of summed distance of the above two algorithms, the both algorithms are compared and the graph is obtained which displays the comparison of node access and efficiency .The lesser the node access is greater the efficiency. Therefore the crystal report displays the graph, which shows the cardinality of the algorithms.
3.12 TESTING PROCESS Testing is a process of checking whether the developed system is working according to the original objectives and requirements. Testing is a set of activities that can be planned in advance and conducted systematically. Testing is vital to the success of the system. System testing makes a logical assumption that if all the parts of the system are correct, the global will be successfully achieved. In adequate testing if not testing leads to errors that may not appear even many months. This creates two problems, 1. The time lag between the cause and the appearance of the problem 2. The effect of the system errors on the files and records within the system A small system error can conceivably explode into a much larger problem. Effective testing early in the purpose translates directly into long term cost savings from a reduced number of errors. Another reason for system testing is its utility, as a useroriented vehicle before implementation. The best programs are worthless if it procedures the correct outputs. No other test can be more crucial. Following this step a variety of tests are conducted. Unit testing Integration testing Validation testing
21
3.12.1 FUNCTIONAL TESTING Functional testing of an application is used to prove the application delivers correct results, when a user enters the network the IP address of the user is checked by the administrator and its authorization is found by the administrator.
Expected result
Result
cache Pass
responses 1.
should be in the should be in the approximate value 28.9ms Test for approximate around
various The result after The result after Pass execution execution
2.
responses
should give the should give the accurate result. Table 1: Functional Testing accurate result.
3.12.2 NON-FUNCTIONAL TESTING This testing used to check that an application will work in the operational environment. Non-Functional Testing includes Load testing Performance testing Reliability testing
22
3.12.2.1 LOAD TESTING Test case no It Description is Actual Result Expected result Should designate drive another drive Result Pass
in RAID array.
3.12.2.2 PERFORMANCE TESTING Test case no Description Actual Result Expected result Result
This is required to Should handle Should handle Pass assure application that an large input large and values, produce input and
performs values,
capability to handle accurate result accurate result many READ WRITE in a expected in a expected 1. requests, delivering its time results in expected time
23
3.12.2.3 RELIABILITY TESTING Test case no Description Actual Result case Expected result Result
the server is rugged failure of the of the server an and reliable and can server 1. an alternate server
handle the failure of alternate server should take over any of the components should take the job.
involved in provide the over the job. applications. Table 4: Reliability Testing
3.12.3 BLACK BOX TESTING Black box testing, also called behavioral testing focuses on the functional requirements of the software. That is, black box testing enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program. Black box testing is not alternative to white box techniques. Rather it is a complementary approach that is likely to uncover a different class of errors than white box methods. Black box testing attempts to find errors in the following categories. Test case no. 1. Selecting the Choose input object its the Obtainment Obtainment of Pass Description Input Actual Result Expected Result Result
query object and select of query with query with the with 3 nearest the users selected nearest features.
24
nearest features.
query. 2. Selecting the Choose input object its the List of input List of input Pass
query object and select object with 3 nearest its users its
input object with summed distance. 3. Selecting the Choose the List of input List of input Pass its
input object object and select object will be object will be with nearest its 3 nearest displayed in displayed in a sorted sorted order its users order with its with summed distance its summed of distance of its
summed
features.
distance in a sorted order. 4. Selecting the Select required required the The selected The selected Pass
input object will be object will be displayed with its its map distance, overlay
input object object from the displayed from the list list of objects. of objects with distance,
map overlay with respect to with respect its to its nearest features. nearest
overlay the
of
features.
selected
object. 5. Selecting the Select the map The list of The input object overlay for the objects with nearest its list of list of Pass
input be displayed displayed with with nearest features individually one by one. its 3 its 3 nearest
key objects
3.12.4 WHITE BOX TESTING Test case no Description Exercise 1. all Actual Result Expected result Result
logical All the logical All the logical Pass must decision be valid. must
Execute all loops at All the loops All the loops Pass 2. their boundaries and must be finite. within their must be finite.
operational bounds. Exercise internal data All the data- All the data- Pass 3. structures to ensure structures must structures must their validity. be valid Table 6: White Box Testing be valid
26
White box testing, sometimes called glass-box testing is a test case design method that uses the control structure of the procedural design to device test cases. Using white box testing method, the software engineer can drive test cases. 3.12.5 UNIT TESTING A program represents the logical elements of a system. For a program to run satisfactorily, it must compile and test data correctly and tie in properly with other programs. Achieving an error free program is the responsibility of the programmer. Program testing check for two types of errors: Syntax and logical. Syntax error is a program statement that violates one or more rules of the language in which is written. An improperly defined field dimension or omitted keywords are common syntax errors. These errors are shown through error message generated by the computer. For logic errors the programmer must examine the output carefully. When a program is tested, the actual output is compared with the expected output. When there is a discrepancy the sequence of instructions must be traced to determine the problem. The process is facilitated by breaking the program into self-contained portions, each of which can be checked at certain key points. Test case no Description Test for application Properties 1. Actual Result All properties Expected result Result
to be properly to be properly aligned displayed. Table 7: Unit testing and aligned displayed. and
27
This project querying nearest neighbor spatial objects has done the process of searching the locations in and around Coimbatore for easy accessing of details about housing,hospitals,educational institutions and also shoppig markets. When the user selects the required field,the selected features will be displayed and field has gandhipuram as an origin so that it shows the distance,landmarks etc., for the selected field.
28
MAP OVERLAY
The home screen has the field of Map Overlay, when the user click on to that field, the map for the selected key field will be displayed with various colors such as, Green for schools Red for Housing Orange for Hospitals Pink for Shopping Markets
29
ZOOM MAP
When the user needs to review a details about a particular location, then they can select the required location and can zoom the location for further clear details.
30
Whereas hierarchical algorithm and probing algorithm have same process of location searching. Crystal report shows the difference between these two algorithms.
31
Crystal report defines that node accessing on probing algorithm is complex than hierarchical. For eg, Probing algorithm may require 78node accessing for retrieving user information but hierarchical may require only 20 node accessing.
32
5.1 CONCLUSION We have introduced a new type of query called as Aggregate Nearest Keyword Query which retrieves number of objects from Query keyword Q with minimum sum of distances to its nearest Data points. We use probing algorithm and hierarchical join algorithm, which prunes the query objects and finally the minimized summed distance is calculated. We have shown that the experiment on ANK query reduces the cost significantly. The number of node accesses is also reduced which reduces the query response time, which exhibits good scalability with the query objects and the number of query keywords. 5.2 FUTURE WORK We described probing and hierarchical join approaches which reduces query response time and provides good scalability and accuracy which is implemented by using sample geographical data sets of Coimbatore. So in future we are planning to implement real data sets of Coimbatore with its graphical map display plotted with the scale(x, y axis). We can achieve the geographical data objects of Coimbatore with its real data sets of latitude and longitude measures from the origin to the desired input object with respect to its nearest neighbors in distance (kms), which provides both accuracy and efficiency.
33
APPENDICES SAMPLE CODING PROBING ALGORITHM -------------------Probing Algorithm Begins---------------------------Sub probing_algorithm() Dim nodeaccess As Integer Dim temp, pert As Double pert = 100000 For i = 0 To (P.Rows.Count - 1) For j = 0 To (N1.Rows.Count - 1) nodeaccess += 1 temp=Math.Sqrt((Math.Pow((p_lat(i)-N1_lat(j)),2))+ Math.Pow((p_long(i) - N1_long(j)), 2))) If temp < pert Then pert = temp dr.BeginEdit() dr(0) = p_objects(i) dr(1) = f1(j) dr(2) = N1_lat(j) dr(3) = N1_long(j) dr(4) = temp dr.EndEdit() End If Next
For j = 0 To (N2.Rows.Count - 1) temp = Math.Sqrt((Math.Pow((p_lat(i) - N2_lat(j)), 2)) + (Math.Pow((p_long(i) - N2_long(j)), 2))) nodeaccess += 1
34
If temp < pert Then dr1.BeginEdit() dr1(0) = p_objects(i) dr1(1) = f2(j) dr1(2) = N2_lat(j) dr1(3) = N2_long(j) dr1(4) = temp dr1.EndEdit() End If Next
For j = 0 To (N3.Rows.Count - 1) nodeaccess += 1 temp = Math.Sqrt((Math.Pow((p_lat(i) - N3_lat(j)), 2)) + (Math.Pow((p_long(i) - N3_long(j)), 2))) If temp < pert Then pert = temp dr2.BeginEdit() dr2(0) = p_objects(i) dr2(1) = f3(j) dr2(2) = N3_lat(j) dr2(3) = N3_long(j) dr2(4) = temp dr2.EndEdit() End If Next t_ds.Tables(2).Rows.Add(dr2)
35
For i = 0 To (P.Rows.Count - 1) Dim drws As DataRow = result.NewRow() drws.BeginEdit() drws(0) = p_objects(i).ToString drws(1) = CType(tempdist(i), Double) drws.EndEdit() Next
Try con.Open() cmd = New OleDbCommand("update Graph set NodeAccess = " & nodeaccess & " where Algorithm = 'Probing'", con) cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) Finally con.Close() End Try End Sub
36
Imports System.Data.OleDb Public Class prb Dim con As New OleDbConnection Dim cmd As New OleDbCommand Dim adp As New OleDbDataAdapter Dim ds As New DataSet Dim dread As OleDbDataReader Dim p_lat(50), p_long(50), N1_lat(50), N1_long(50), N2_lat(50), N2_long(50), N3_lat(50), N3_long(50), dist(50), f1_lat(50), f1_long(50), f2_lat(50), f2_long(50), f3_lat(50), f3_long(50) As Double Dim p_objects(50), p_obj(50), f1(50), f2(50), f3(50) As String Dim P, N1, N2, N3, result As New DataTable Dim t_ds As New DataSet Dim tempdist(50) As Double Public featurename(2), featu As String Public featurelat(2), query(1) As Integer Public featurelon(2) As Integer Public featuredist(2) As Double Private Sub prb_FormClosed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.FormClosed mn.Show() End Sub
Private Sub prb_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\admin\Desktop\WindowsApplication1\WindowsApplication1\bin\Debu g\Spatial_CBE.mdb") Try con.Open() cmd = New OleDbCommand("select distinct category from feature", con) dread = cmd.ExecuteReader() While dread.Read ComboBox1.Items.Add(dread.GetValue(0)) ComboBox2.Items.Add(dread.GetValue(0)) ComboBox3.Items.Add(dread.GetValue(0)) ComboBox4.Items.Add(dread.GetValue(0)) End While Catch ex As Exception MsgBox(ex.Message) Finally dread.Close() con.Close() End Try
37
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = ComboBox1.Text & " near " & ComboBox2.Text & "," & ComboBox3.Text & " and " & ComboBox4.Text Try P = getdata("select Feature,Latitude,Longitude from feature where category='" & ComboBox1.Text & "' ") N1 = getdata("select Feature,Latitude,Longitude from feature where category='" & ComboBox2.Text & "' ") N2 = getdata("select Feature,Latitude,Longitude from feature where category='" & ComboBox3.Text & "' ") N3 = getdata("select Feature,Latitude,Longitude from feature where category='" & ComboBox4.Text & "' ") For i = 0 To (P.Rows.Count - 1) p_objects(i) = P.Rows(i).Item(0) p_lat(i) = P.Rows(i).Item(1) p_long(i) = P.Rows(i).Item(2) Next For i = 0 To (N1.Rows.Count - 1) f1(i) = N1.Rows(i).Item(0) N1_lat(i) = N1.Rows(i).Item(1) N1_long(i) = N1.Rows(i).Item(2) Next For i = 0 To (N2.Rows.Count - 1) f2(i) = N2.Rows(i).Item(0) N2_lat(i) = N2.Rows(i).Item(1) N2_long(i) = N2.Rows(i).Item(2) Next For i = 0 To (N3.Rows.Count - 1) f3(i) = N3.Rows(i).Item(0) N3_lat(i) = N3.Rows(i).Item(1) N3_long(i) = N3.Rows(i).Item(2) Next
Public Function getdata(ByVal query As String) As DataTable Dim dt As DataTable dt = New DataTable con.Open() adp = New OleDbDataAdapter(query, con) adp.Fill(dt) con.Close() Return dt End Function Sub probing_algorithm() Dim nodeaccess As Integer result = New DataTable t_ds = New DataSet t_ds.Tables.Add() t_ds.Tables(0).Columns.Add("Query") t_ds.Tables(0).Columns.Add("Feature") t_ds.Tables(0).Columns.Add("Latitude") t_ds.Tables(0).Columns.Add("Longitude") t_ds.Tables(0).Columns.Add("Distance") t_ds.Tables.Add() t_ds.Tables(1).Columns.Add("Query") t_ds.Tables(1).Columns.Add("Feature") t_ds.Tables(1).Columns.Add("Latitude") t_ds.Tables(1).Columns.Add("Longitude") t_ds.Tables(1).Columns.Add("Distance") t_ds.Tables.Add() t_ds.Tables(2).Columns.Add("query") t_ds.Tables(2).Columns.Add("Feature") t_ds.Tables(2).Columns.Add("Latitude") t_ds.Tables(2).Columns.Add("Longitude") t_ds.Tables(2).Columns.Add("Distance") Dim temp, pert As Double pert = 100000 For i = 0 To (P.Rows.Count - 1) Dim dr As DataRow = t_ds.Tables(0).NewRow For j = 0 To (N1.Rows.Count - 1) nodeaccess += 1
39
temp = Math.Sqrt((Math.Pow((p_lat(i) - N1_lat(j)), 2)) + (Math.Pow((p_long(i) - N1_long(j)), 2))) If temp < pert Then pert = temp dr.BeginEdit() dr(0) = p_objects(i) dr(1) = f1(j) dr(2) = N1_lat(j) dr(3) = N1_long(j) dr(4) = temp dr.EndEdit() End If Next t_ds.Tables(0).Rows.Add(dr) Dim dr1 As DataRow = t_ds.Tables(1).NewRow tempdist(i) += pert pert = 80000 For j = 0 To (N2.Rows.Count - 1) temp = Math.Sqrt((Math.Pow((p_lat(i) - N2_lat(j)), 2)) + (Math.Pow((p_long(i) - N2_long(j)), 2))) nodeaccess += 1 If temp < pert Then pert = temp dr1.BeginEdit() dr1(0) = p_objects(i) dr1(1) = f2(j) dr1(2) = N2_lat(j) dr1(3) = N2_long(j) dr1(4) = temp dr1.EndEdit() End If Next t_ds.Tables(1).Rows.Add(dr1) Dim dr2 As DataRow = t_ds.Tables(2).NewRow tempdist(i) += pert pert = 80000 For j = 0 To (N3.Rows.Count - 1) nodeaccess += 1 temp = Math.Sqrt((Math.Pow((p_lat(i) - N3_lat(j)), 2)) + (Math.Pow((p_long(i) - N3_long(j)), 2))) If temp < pert Then
40
pert = temp dr2.BeginEdit() dr2(0) = p_objects(i) dr2(1) = f3(j) dr2(2) = N3_lat(j) dr2(3) = N3_long(j) dr2(4) = temp dr2.EndEdit() End If Next t_ds.Tables(2).Rows.Add(dr2) tempdist(i) += pert pert = 80000 Next result.Columns.Add("Features") result.Columns.Add("Sum_of_Nearest_Distance", GetType(Double))
For i = 0 To (P.Rows.Count - 1) Dim drws As DataRow = result.NewRow() drws.BeginEdit() drws(0) = p_objects(i).ToString drws(1) = CType(tempdist(i), Double) drws.EndEdit() result.Rows.Add(drws) Next
result.DefaultView.Sort = "Sum_of_Nearest_Distance" DataGridView1.DataSource = result Button1.Enabled = False Try con.Open() cmd = New OleDbCommand("update Graph set NodeAccess = " & nodeaccess & " where Algorithm = 'Probing'", con) cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) Finally con.Close() End Try End Sub Public Function passdata() As DataTable Return P
41
End Function Public Function passdata1() As DataSet Return t_ds End Function Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click map.Show() Me.Hide() End Sub Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click For i = 0 To 50 p_obj(i) = Nothing p_objects(i) = Nothing N1_lat(i) = Nothing N2_lat(i) = Nothing N3_lat(i) = Nothing N1_long(i) = Nothing N2_long(i) = Nothing N3_long(i) = Nothing tempdist(i) = Nothing Next result = New DataTable P = New DataTable N1 = New DataTable N2 = New DataTable N3 = New DataTable DataGridView1.DataSource = result TextBox1.Clear() ComboBox1.Text = Nothing ComboBox2.Text = Nothing ComboBox3.Text = Nothing ComboBox4.Text = Nothing Button1.Enabled = True End Sub Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick End Sub
42
Dim dr1() As DataRow dr1 = P.Select("Feature= '" & DataGridView1.Item(0, e.RowIndex).Value & "' ") featu = dr1(0).Item(0).ToString query(0) = dr1(0).Item(1) query(1) = dr1(0).Item(2)
For k = 0 To 2 Dim dr() As DataRow dr = t_ds.Tables(k).Select("Query= '" & DataGridView1.Item(0, e.RowIndex).Value & "' ") featurename(k) = dr(0).Item(1).ToString featurelat(k) = dr(0).Item(2) featurelon(k) = dr(0).Item(3) featuredist(k) = dr(0).Item(4) Next zoommap.Show() End Sub End Class -------------------Probing Algorithm Ends----------------------------
43
HIERARCHICAL JOIN ALGORITHM -------------------Hierarachical join algorithm begins---------------------Sub hierarchical() For k = 0 To 5 f = p.Select("Index = " & k & " ") nf1 = n1.Select("Index = " & k & " ") nf2 = n2.Select("Index = " & k & " ") nf3 = n3.Select("Index = " & k & " ") For i = 0 To f.Length - 1 feature(d) = f(i).Item(0).ToString d += 1 pert = 100000
If nf1.Length = 0 Then nn = tree(k) Dim n As Integer While nf1.Length = 0 nf1 = n1.Select("Index = " & nn(n) & " ") n=n+1 End While End If
For j = 0 To nf1.Length - 1 nodeaccess += 1 temp = Math.Sqrt((Math.Pow((f(i).Item(1) - nf1(j).Item(1)), 2)) + (Math.Pow((f(i).Item(2) - nf1(j).Item(2)), 2))) If temp < pert Then pert = temp End If Next
44
If nf2.Length = 0 Then nn = tree(k) Dim m As Integer While nf2.Length = 0 nf2 = n2.Select("Index = " & nn(m) & " ") m=m+1 End While End If
For j = 0 To nf2.Length - 1 nodeaccess += 1 temp = Math.Sqrt((Math.Pow((f(i).Item(1) - nf2(j).Item(1)), 2)) + (Math.Pow((f(i).Item(2) - nf2(j).Item(2)), 2))) If temp < pert Then pert = temp End If Next tempdist(c) += pert pert = 100000
If nf3.Length = 0 Then nn = tree(k) Dim o As Integer While nf3.Length = 0 nf3 = n3.Select("Index = " & nn(o) & " ") o=o+1 End While End If
45
For j = 0 To nf3.Length - 1 nodeaccess += 1 temp = Math.Sqrt((Math.Pow((f(i).Item(1) - nf3(j).Item(1)), 2)) + (Math.Pow((f(i).Item(2) - nf3(j).Item(2)), 2))) If temp < pert Then pert = temp End If Next tempdist(c) += pert c=c+1 Next Next
result.Columns.Add("Features") result.Columns.Add("Sum_of_Nearest_Distance")
For i = 0 To (p.Rows.Count - 1) Dim drws As DataRow = result.NewRow() drws.BeginEdit() drws(0) = feature(i) drws(1) = tempdist(i) drws.EndEdit() result.Rows.Add(drws) Next result.DefaultView.Sort = "Sum_of_Nearest_Distance" DataGridView1.DataSource = result Button1.Enabled = False End Class
46
Imports System.Data.OleDb Public Class hj Dim con As New OleDbConnection Dim cmd As New OleDbCommand Dim adp As New OleDbDataAdapter Dim tempdist(15) As Double Dim ds As New DataSet Dim p, n1, n2, n3, result As New DataTable Dim dread As OleDbDataReader Dim feature(150) As String Private Sub hj_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed mn.Show() End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = ComboBox1.Text & " near " & ComboBox2.Text & "," & ComboBox3.Text & " and " & ComboBox4.Text Try p = getdata("select Feature,Latitude,Longitude,Index from feature where Category = '" & ComboBox1.Text & "' ") n1 = getdata("select Feature,Latitude,Longitude,Index from feature where Category = '" & ComboBox2.Text & "' ") n2 = getdata("select Feature,Latitude,Longitude,Index from feature where Category = '" & ComboBox3.Text & "' ") n3 = getdata("select Feature,Latitude,Longitude,Index from feature where Category = '" & ComboBox4.Text & "' ") hierarchical() Catch ex As Exception MsgBox(ex.Message) End Try End Sub Public Function getdata(ByVal query As String) As DataTable Dim dt As DataTable dt = New DataTable con.Open() adp = New OleDbDataAdapter(query, con) adp.Fill(dt) con.Close() Return dt End Function Dim f(), nf1(), nf2(), nf3() As DataRow Sub hierarchical() Dim c, d As Integer
47
Dim nodeaccess As Integer = 0 Dim nn(4) As Integer For k = 0 To 5 f = p.Select("Index = " & k & " ") nf1 = n1.Select("Index = " & k & " ") nf2 = n2.Select("Index = " & k & " ") nf3 = n3.Select("Index = " & k & " ") Dim temp, pert As Double
If nf1.Length = 0 Then nn = tree(k) Dim n As Integer While nf1.Length = 0 nf1 = n1.Select("Index = " & nn(n) & " ") n=n+1 End While End If
For j = 0 To nf1.Length - 1 nodeaccess += 1 temp = Math.Sqrt((Math.Pow((f(i).Item(1) - nf1(j).Item(1)), 2)) + (Math.Pow((f(i).Item(2) - nf1(j).Item(2)), 2))) If temp < pert Then pert = temp End If Next tempdist(c) += pert pert = 80000
nf2 = n2.Select("Index = " & nn(m) & " ") m=m+1 End While End If
For j = 0 To nf2.Length - 1 nodeaccess += 1 temp = Math.Sqrt((Math.Pow((f(i).Item(1) - nf2(j).Item(1)), 2)) + (Math.Pow((f(i).Item(2) - nf2(j).Item(2)), 2))) If temp < pert Then pert = temp End If Next tempdist(c) += pert pert = 80000
If nf3.Length = 0 Then nn = tree(k) Dim o As Integer While nf3.Length = 0 nf3 = n3.Select("Index = " & nn(o) & " ") o=o+1 End While End If
For j = 0 To nf3.Length - 1 nodeaccess += 1 temp = Math.Sqrt((Math.Pow((f(i).Item(1) - nf3(j).Item(1)), 2)) + (Math.Pow((f(i).Item(2) - nf3(j).Item(2)), 2))) If temp < pert Then pert = temp End If Next tempdist(c) += pert c=c+1 Next Next result.Columns.Add("Features") result.Columns.Add("Sum_of_Nearest_Distance", GetType(Double))
49
For i = 0 To (p.Rows.Count - 1) Dim drws As DataRow = result.NewRow() drws.BeginEdit() drws(0) = feature(i) drws(1) = CType(tempdist(i), Double) 'drws(1) = tempdist(i) drws.EndEdit() result.Rows.Add(drws) Next result.DefaultView.Sort = "Sum_of_Nearest_Distance" DataGridView1.DataSource = result Button1.Enabled = False Try con.Open() cmd = New OleDbCommand("update Graph set NodeAccess = " & nodeaccess & " where Algorithm = 'H_join'", con) cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) Finally con.Close() End Try End Sub Function tree(ByVal k As Integer) As Array Dim nn(4) As Integer Select Case k Case 0 nn(0) = 2 nn(1) = 1 nn(2) = 3 nn(3) = 5 nn(4) = 4 Case 1 nn(0) = 0 nn(1) = 5 nn(2) = 2 nn(3) = 3 nn(4) = 4 Case 2
50
nn(0) = 0 nn(1) = 3 nn(2) = 1 nn(3) = 4 nn(4) = 5 Case 3 nn(0) = 2 nn(1) = 0 nn(2) = 4 nn(3) = 1 nn(4) = 5 Case 4 nn(0) = 3 nn(1) = 2 nn(2) = 0 nn(3) = 1 nn(4) = 5 Case 5 nn(0) = 1 nn(1) = 0 nn(2) = 2 nn(3) = 3 nn(4) = 4 End Select Return nn End Function Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click For i = 0 To 15 tempdist(i) = Nothing feature(i) = Nothing Next result = New DataTable p = New DataTable n1 = New DataTable n2 = New DataTable n3 = New DataTable DataGridView1.DataSource = result TextBox1.Clear() ComboBox1.Text = Nothing ComboBox2.Text = Nothing ComboBox3.Text = Nothing ComboBox4.Text = Nothing
51
Button1.Enabled = True End Sub Private Sub hj_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\admin\Desktop\WindowsApplication1\WindowsApplication1\bin\Debu g\Spatial_CBE.mdb") Try con.Open() cmd = New OleDbCommand("select distinct category from feature", con) dread = cmd.ExecuteReader() While dread.Read ComboBox1.Items.Add(dread.GetValue(0)) ComboBox2.Items.Add(dread.GetValue(0)) ComboBox3.Items.Add(dread.GetValue(0)) ComboBox4.Items.Add(dread.GetValue(0)) End While Catch ex As Exception MsgBox(ex.Message) Finally dread.Close() con.Close() End Try End Sub End Class -------------------Hierarachical join algorithm ends----------------------
52
REFERENCES
1. T. Brinkhoff, H.-P. Kriegel, and B. Seeger(1993) Efficient processing of spatial joins using r-trees, in SIGMOD Conference, pp. 237246. 2. Y.-Y. Chen, T. Suel, and A. Markowetz (2006) Efficient query processing in geographic web search engines, in SIGMOD Conference, pp. 277288. 3. A. Corral, Y. Manolopoulos, Y. Theodoridis, and M. Vassilakopoulos (2000)Closest pair queries in spatial databases, in SIGMOD Conference,pp. 189200. 4. I.D. Felipe, V. Hristidis, and N. Rishe(2008) Keyword search on spatial databases, in ICDE, pp. 656665. 5. A. Guttman(1984) R-trees: A dynamic index structure for spatial searching, in SIGMOD Conference, pp. 4757. 6. G. R. Hjaltason and H. Samet(1998) Incremental distance join algorithms for spatial databases, in SIGMOD Conference, pp. 237248. 7. B.-U. Pagel, H.-W. Six, H. Toben, and P. Widmayer(1993) Towards an analysis of range query performance in spatial data structures, in PODS, pp. 214221. 8. D. Papadias, Q. Shen, Y. Tao, and K. Mouratidis(2004)Group nearest neighbor queries, in ICDE, pp. 301 312. 9. N. Roussopoulos, S. Kelley, and F. Vincent,1995 Nearest neighbor queries, in SIGMOD Conference, pp. 7179. 10. M. L. Yiu, X. Dai, N. Mamoulis, and M. Vaitis,2007 Top-k spatial preference queries, in ICDE, pp. 10761085.
53