imperiumlabs / GeoFirestore-Android

GeoFirestore for Android - Realtime location queries with Firestore
MIT License
123 stars 36 forks source link

getAtLocation returning results out of radius bounds #52

Open ThinClient opened 4 years ago

ThinClient commented 4 years ago

20200828_084911 After fetching results using getAtlocation and inserting markers on a map, I drew a circle on the map using the same radius and center as the query radius and center. The are a lot of points outside the circle which means results that are out of bounds are being returned.

ThinClient commented 4 years ago

I'm assuming the implementation of the search uses geohashes. After doing some research on geohashes, I understand that results might not be exact. I don't know whether the implementation of the algorithm compensates for that but if it doesn't, we could get more accurate results by further filtering the results on the client side by using distance utility functions such as provided by the Location object or SphericalUtils. While this does not save bandwidth and database querying costs, it provides more accurate results. Enlighten me.