Posts

Showing posts from June, 2018

Working out Concave/Convex Hull

This post is nearly like a continuation of my previous post.  But not necessarily need to be followed. This post itself is a note on my learnings with finding out a concave hull solution for a project that I worked on recently. Requirements: We had a requirement where the user would simply freehand draw (FHD) on a map view and we should be able to fetch the list of users located/contained in that region. Our Tools: We used MongoDB as the backend, which provides us with beautiful queries/API's  fast enough to search the list of users(we have in our DB) within a given polygon (Polygon = Freehand drawing enclosed with the starting & ending points, hence forming a region). The only issue with MongoDB search is that it expects a perfect polygon with no intersection at all. If a single point in the polygon intersects then it'll simply throw out an error . Not sure if MongoDB guys did this intentionally, but it leaves its users with a huge burden/workaround to handle &a