Inspiration
As a group of adolescents just receiving our licenses, finding the ideal location to meet posed a difficult problem given our inexperience with the roads between our houses. Moreover, the constant struggle in finding the place equidistant from each of our houses, of course to rid the extra thirty seconds of driving for one person, combined with our hormonal instinct to endlessly argue compelled us to create an app that would objectively make the decision for us.
What it does
Summary
In order to minimize the work necessary to find the ideal rendezvous point, we created an iOS app into which users input the addresses of all attendees of the meetup. While there already exist apps that identify the middle point between two locations, none facilitate more than two users. Thus, we decided to create an app that finds the centroid of three or more points represented by the locations of users, giving rise to the name of the app. Furthermore, few apps on the market suggest meeting locations, even if they correctly identify a middle point. Thus, Centroid offers a unique service, finding the ideal meeting places between any number of attendants.
Features
- Clean, user-friendly UI (see pictures)
- Returns sorted ideal meeting locations within a given radius about the centroid
- Integrated with Apple Maps to provide directions to any suggested meeting location
- Allows users to add and delete as many addresses as desired
How we built it
1. User inputs address
2. Convert input string, the address, to geo-coordinates using MapKit
3. Identify the convex hull from the geo-coordinates using mathematical computations
4. Derive the formula to find the Centroid from the convex hull using our knowledge of calculus
5. Find possible meeting locations around geo-coordinates using Yelp API
6. Sort locations using Yelp search function - identifies best meetup spots
7. Display top five locations with pins on the map UI
8. Provide address and directions to the chosen location utilizing Apple Maps
Challenges we ran into
Although our idea was indeed quite rigorous, with numerous moving parts and difficult mathematical implementations, we found that our modularization of tasks and effective use of version control significantly helped mange our tasks. We each completed unique components of the overall pipeline, both enhancing efficiency and developing a clean and well-documented overall application. A few particular hurdles we overcame, however, include the implementation of numerous tasks in Swift 2.0 that were implemented in worse complexity via common API's. While the use of APIs seemed appealing initially, we utilized MapKit and pure coordinate geometry to speed up our application in favor of blindly using APIs. Such dedication to efficient programming resulted in numerous backend bugs that were difficult to overcome (especially with little help available for Swift 2.0)
Accomplishments that we're proud of
We're proud of the work we did as a team and our ability to effectively modularize our numerous tasks to achieve a stable end release in 24 hours. We're also proud of our limited use of external APIs in favor of user-developed functions to achieve runtimes as fast as O(N log N) and provide an easy-to-use, yet powerful, app for users. We hope our app will truly benefit the social networking sphere and inspire others to meet up, wherever they are, with a click of a button.
What we learned
Over the course of twenty four hours, we learned how to manage our time and compartmentalize tasks in a manner which allowed us to complete the maximum amount of work. Working on this app gave our team members a much more in depth understanding of Swift, and especially of the differences in syntax between the different version of Swift. Furthermore, we gained an extensive understanding of how to use the Yelp API and other location based services. Having previously worked almost uniformly with REST API's, the Yelp and Google API's offered a new and unique experience which taught us a great deal. Finally, we learned that even if individual parts of a project work individually, the process of putting those pieces of the puzzle together poses perhaps an even greater task than any piece itself.
What's next for Centroid
While we are extremely happy with our results from the 24 hours we worked on Centroid at the Hackathon, we see vast areas for improvement including:
- Filters
- Link to Apple Contacts
- Manhattan distance as a factor in location sort
- Settings page – can alter radius, “default location,” etc…
Ultimately, our goal is to refine the app until we are absolutely happy with it and then release it on the app store so people like us can use it
Log in or sign up for Devpost to join the conversation.