meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jolla2014:group7:start [2014/03/05 19:26]
3_fishermen [Screenshots]
jolla2014:group7:start [2014/03/06 11:48] (current)
3_fishermen
Line 1: Line 1:
-Welcome to Wiki Page of Group 7. In this page, you will find everything you need to know about our **"Rate My Place!"** application.+\\ 
 +//Welcome to Wiki Page of Group 7. In this page, you will find everything you need to know about our **"Rate My Place!"** application.//
 \\ \\
 \\ \\
Line 20: Line 21:
 \\ \\
 \\ \\
-To help the user determine the quality of the apartment, we calculate a rating (from 1 to 5 stars)based on the distance criteria. The nearest the distance from the 7 places, the higher the rating will be. If distance is within 300 meters, score will be 5 star. Within 500 meters, score will be 4 stars. Within 700 meters, score will be 3 stars. Within 1 km, score will be 2 stars. And lastly, within km, score will be 1 star. After getting 7 individual scores, finally we calculate the total score using simple average of those individual scores.For example, an apartment which has bus stops,shops,atm,university,city center, restaurant, and hospitals in 300 meters distance will got highest rate of 5 stars because each of individual scores are also 5 stars. However, we put some exception that if the individual score of bus stop is 5 stars (meaning: there is a bus stop within 300 meter distance from apartment), then the total score will get at least 3 stars. We made an assumption that as long as there is a bus top nearby, it is basically easy to go almost anywhere, therefore the bus stop has the highest priority among all.+To help the user determine the quality of the apartment, we calculate a rating (from 1 to 5 stars)based on the distance criteria. The nearest the distance from the 7 places, the higher the rating will be. If distance is within 300 meters, score will be 5 star. Within 500 meters, score will be 4 stars. Within 700 meters, score will be 3 stars. Within 1 km, score will be 2 stars. And lastly, within km, score will be 1 star. After getting 7 individual scores, finally we calculate the total score using simple average of those individual scores.For example, an apartment which has bus stops,shops,atm,university,city center, restaurant, and hospitals in 300 meters distance will got highest rate of 5 stars because each of individual scores are also 5 stars. However, we put some exception that if the individual score of bus stop is 5 stars (meaning: there is a bus stop within 300 meter distance from apartment), then the total score will get at least 3 stars. We made an assumption that as long as there is a bus top nearby, it is basically easy to go almost anywhere, therefore the bus stop has the highest priority among all.
 \\ \\
 \\ \\
Line 53: Line 54:
 \\ \\
 \\ \\
 +====== Some Codes ======
 +**Retrieval of Coordinate of an address**
  
 +<code>
 +
 +QString urlString =  "http://nominatim.openstreetmap.org/search.php?q="+address+"&viewbox=28.13$2C 61.05$2C28.14$2C61.04&format=xml";
 +
 +    //Getting the XML for the user's address
 +    manager = new QNetworkAccessManager(this);
 +    reply = manager->get(QNetworkRequest(urlString));
 +    QEventLoop loop;
 +    connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
 +    loop.exec();
 +
 +
 +    //Parsing the XML to get the coordinate of the user's address
 +    QDomDocument *doc = new QDomDocument();
 +    doc->setContent(reply);
 +
 +
 +    //Get the root element
 +      QDomElement docElem = doc->documentElement();
 +      QDomNodeList nodeList = docElem.elementsByTagName("place");
 +
 +      //Check each node one by one.
 +          //for(int ii = 0;ii < nodeList.count(); ii++)
 +      for(int ii = 0;ii < 1; ii++)
 +QString urlString =  "http://nominatim.openstreetmap.org/search.php?q="+address+"&viewbox=28.13$2C 61.05$2C28.14$2C61.04&format=xml";
 +
 +    //Getting the XML for the user's address
 +    manager = new QNetworkAccessManager(this);
 +    reply = manager->get(QNetworkRequest(urlString));
 +    QEventLoop loop;
 +    connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
 +    loop.exec();
 +
 +
 +    //Parsing the XML to get the coordinate of the user's address
 +    QDomDocument *doc = new QDomDocument();
 +    doc->setContent(reply);
 +
 +
 +    //Get the root element
 +      QDomElement docElem = doc->documentElement();
 +      QDomNodeList nodeList = docElem.elementsByTagName("place");
 +
 +      //Check each node one by one.
 +          //for(int ii = 0;ii < nodeList.count(); ii++)
 +      for(int ii = 0;ii < 1; ii++)
 +                {
 +              QDomElement el = nodeList.at(ii).toElement();
 +              latit = el.attribute("lat");
 +              longit = el.attribute("lon");
 +          }
 +
 +      setLatLong(latit+"|"+longit);
 +
 +</code>
 +\\
 +**Find parameters (bus stops,shops,atm,university,city center, restaurant, and hospitals) closest to the address**
 +<code>
 +//within 500m
 +            //1. Getting ATM list
 +            QString atmString = "(node(around:500,"+latit+","+longit+")[\"amenity\"=\"atm\"];>;);out;";
 +            atmString = "http://overpass.osm.rambler.ru/cgi/interpreter?data="+atmString;
 +            //Getting the XML
 +            //manager = new QNetworkAccessManager(this);
 +            reply = manager->get(QNetworkRequest(atmString));
 +            connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
 +            loop.exec();
 +
 +              doc->setContent(reply);
 +            //Get the root element
 +              docElem = doc->documentElement();
 +              nodeList = docElem.elementsByTagName("node");
 +              if (nodeList.count()>0){
 +                  //setAddressToRate("ada di <500m");
 +                  theATM.score = "4";
 +                  theATM.distance="500";
 +
 +                //  setAddressToRate("Score"+theATM.score);
 +                  for(int ii=0;ii<nodeList.count();ii++){
 +                      // get the current one as QDomElement
 +                      QDomElement el = nodeList.at(ii).toElement();
 +
 +                      atmResult = atmResult+"$"+"lat:"+el.attribute("lat")+"|lon:"+el.attribute("lon");
 +                  }
 +                  atmResult=atmResult+"|score:4|distance:500";
 +                  atmResulti=4;
 +
 +</code>
 +\\
 +**Rate the place**
 +<code>
 +totalz = totalz+atmResulti + municipalityResulti+restaurantResulti + busStopResulti + universityResulti+ smarketResulti + hospitalResulti;
 +totalz=qRound(totalz/7.0);                                                                                                                     if(busStopResulti==5){if(totalz<3)totalz=3;}}                                                                                                                                                                                                                                                        
 +
 +</code>
 +\\
 +\\
 ====== Screenshots ====== ====== Screenshots ======
  
-{{:jolla2014:group7:1.jpg?300|}}{{:jolla2014:group7:2.jpg?300|}}{{:jolla2014:group7:3.jpg?300|}}{{:jolla2014:group7:4.jpg?300|}}\\ +{{:jolla2014:group7:1.jpg?250|}}{{:jolla2014:group7:2.jpg?250|}}{{:jolla2014:group7:3.jpg?250|}}{{:jolla2014:group7:4.jpg?250|}}\\ 
-{{:jolla2014:group7:5.jpg?300|}}{{:jolla2014:group7:detailsmap.png?300|}}{{:jolla2014:group7:location_details.png?300|}}+{{:jolla2014:group7:5.jpg?250|}}{{:jolla2014:group7:detailsmap.png?250|}}{{:jolla2014:group7:location_details.png?250|}}
 \\ \\
 \\ \\
Line 67: Line 167:
 ====== Report ====== ====== Report ======
 Read this to get a detailed explanation:\\ Read this to get a detailed explanation:\\
-{{:jolla2014:group7:rate_my_place.pdf|}}+{{:jolla2014:group7:rate_my_place_report.pdf|}}
 \\ \\
 \\ \\
 ====== Poster ====== ====== Poster ======
 {{:jolla2014:group7:ratemyplace.png?|300}} {{:jolla2014:group7:ratemyplace.png?|300}}
 +\\
 +\\
 +====== Application ======
 +You can download our application here:\\
 +[[https://openrepos.net/content/3fishermen/rate-my-place]]\\
 \\ \\
 \\ \\
 ====== Source Code ====== ====== Source Code ======
 You can download our source code here:\\ You can download our source code here:\\
-[[https://openrepos.net/content/3fishermen/rate-my-place]]\\ 
 [[https://dl.dropboxusercontent.com/u/50897880/RateMyPlace.zip]] [[https://dl.dropboxusercontent.com/u/50897880/RateMyPlace.zip]]
- 
-