Geofencing - An interesting technical challenge.

344 views
Skip to first unread message

Phil Hodey

unread,
Jul 12, 2015, 3:00:03 PM7/12/15
to fireba...@googlegroups.com
I am writing an app that will be used by a client to monitor events based upon geo-locations.

The idea is that a client would subscribe to all events that occur within a geofenced area, which will be a polygon. When a new event is added to firebase with co-ordinates that fall within the geo fenced area the event will appear in their list.

I'm not even sure it is possible, but Ideally I am looking to create some type of index that would allow a firebase query to return any event that has a coordinates that fall within the geofenced area.

Anybody got any clever ideas here? I can't think of a solution at all :(


Jacob Wenger

unread,
Jul 12, 2015, 3:39:50 PM7/12/15
to fireba...@googlegroups.com
Hey Phil,

We've got a tool which might help you out. Check out GeoFire. It is available for iOS, Android, and the web. It does not currently do polygon queries, but depending on your exact use case, it still might be something you can use. Typically when people ask about polygon queries, I suggest they build a bounding circle around the polygon and use GeoFire to get all the data in that circle. Then they can filter the returned points client-side and determine if they belong inside the polygon. Not perfect, but still should be performant depending on the size of your data set.

Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f58a203a-e87f-403a-a147-922bb002986d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Hodey

unread,
Jul 13, 2015, 1:01:31 AM7/13/15
to fireba...@googlegroups.com
Jacob,

That looks spot on, this is exactly what I need. Thanks for highlighting it!

Phil
Reply all
Reply to author
Forward
0 new messages