Download presentation
Presentation is loading. Please wait.
Published byKrystal Dunnell Modified over 10 years ago
1
1 Clustering Mohammad Rezaei 31.10.2012
2
Clustering Module 1 Input: raw data and parameters Output: clusters information Module 2 Input: raw data and parameters Output: Clustered markers and all functionalities for handling them on the map 2 Markers on the Google map
3
Module 1 File: clustering.js Class: mopsiClustering Usage: dataCluster = {}; dataCluster.data = []; params = {type: "sameServices2", distTh:20, keyword:keyword}; for (i=0; i < lenData; i++) { dataCluster.data[i] = {}; dataCluster.data[i].x = searchResults[i].lat; dataCluster.data[i].y = searchResults[i].lon; dataCluster.data[i].name = searchResults[i].name; } dataCluster.len1 = len1; dataCluster.len2 = len2; dataOut = objCluster.applyClustering(dataCluster, params); DelItemList1 = dataOut.delItems; DelItemList = DelItemList.concat(DelItemList1); 3
4
search_kw abd search_lnk Tables List of keywords for local services in search_kw 4 0pysäkki 4ravintola 5kahvila............ 733555 8482532 8492533.................. search_kwsearch_lnk List of keywords for local services
5
Logic of finding keywords 1. Find all KW_ID from search_lnk table when SERV_ID=X 2. For each KW_ID find the keyword from search_kw table 5
6
Photo of a service Find photo where service_id=X Service_id = 0 means the photo is not linked to any service 6 1873 221009_13-02- 35_631849541. jpg 0999.9MopsiAndreiT NokiaN95_8G B/31.0.015 image/jpg................................................ photo 1- If we delete a photo, we will not have the photo for the service as well 2- For a service there is a photo, then we have the location of the photo from point_id and point table, is it the same as location of the service we already have in search_cache table?
7
Rating User can rate a service when he is logged in User (with user_id) rates a service from x=1 to 5 In services_rating: rating += x and total_votes += 1 This is logged in “votes” table so that the user cannot rate that service again until a certain time To display rating for a service: average = int(rating/total_votes) 7 124092 2301236........................ services_rating 1240101303908139192.168.0.107 2301101304108330192.168.0.107........................ votes
8
Search by keyword 8
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.