Skip to content

Lets you know if you are in the periphery of something

Notifications You must be signed in to change notification settings

sabbiu/fod-location

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Fod-Location-Retriever

This file contains finding of location of restaurant near to you

Model Development

  • find max rectangle that can cover the location
  • sort them

During Checking

  • check using binary search and find the possible hotels for that max_location developed
  • for these filtered location, now check location in polygon

Complexity

From the algorithm used in code,

O(log n + n/2)
= O(n)

----
for 60 locations,
    time = 0.403082 seconds

If the latitude and longitude were checked one by one with each and every hotels then,

 O(n * complexity_of_finding_point_in_polygon )
 where, time_complexity_of_finding_point_in_polygon ~ 0.15 (best_case)

 ----
 for 60 locations,
     time = 3.470986 seconds

So, finally =>

8.611 * time(model_used) = time(best_case_if_second_scenario_was_considered)

Preview

If you open index.html, you can see the polygons which represent area covered by each hotels. And the pointer represents user location. When you hover over the user location, then a number will appear. It corresponds to the number as shown in command prompt in the next figure. test_01 Now, this is the output for locationchooser.py. You can see number assigned to each one of them. Hovering over the location in html file you can see if it matches or not. Some of the pointer lies in multiple hotels. In the command prompt you can see that, for such location, multiple hotels are returned. test_02

About

Lets you know if you are in the periphery of something

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published