firebase / geofire-objc

GeoFire for Objective-C - Realtime location queries with Firebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idea: Geofire to use Open Location Code (plus code) instead of geohash?

Kamuli opened this issue · comments

Just an idea if geofire could store locations using Open location Code
(https://github.com/google/open-location-code) instead of geohash and lat/lon?

Open Location Code is a technology that gives a way of encoding location into a form that is easier to use than latitude and longitude. The codes generated are called plus codes, as their distinguishing attribute is that they include a "+" character.

As an example, the Parliament Buildings in Nairobi, Kenya are located at 6GCRPR6C+24. 6GCR is the area from 2S 36E to 1S 37E. PR6C+24 is a 14 meter wide by 14 meter high area within 6GCR.

Geohashes have a unique property that we rely on:

...data indexed by geohash will have all points for a given rectangular area in contiguous slices (the number of slices depends on the precision required and the presence of geohash "fault lines"). This is especially useful in database systems where queries on a single index are much easier or faster than multiple-index queries. Source

Since the Firebase Realtime Database can only do range queries (contiguous queries starting and ending at certain values), this property is critical to GeoFire. It's not clear to me if Open Location Code has the same property, though if it does, I'd be open to a performance comparison between the two.

If the question is "can we add OLC as well as GeoHash" I think it could be reasonable to do so by adding an o property to the field (in addition to lat/long and g), but I'd like to see some more demand before we implement this, as it will reduce performance (potentially significantly).

Closing since this has seen no new requests.