realm / realm-swift

Realm is a mobile database: a replacement for Core Data & SQLite
https://realm.io
Apache License 2.0
16.31k stars 2.14k forks source link

Geospatial filtering/querying #2569

Closed mhergon closed 9 months ago

mhergon commented 9 years ago

Hi,

Is there any way to do a geospatial filtering by distance? I'm trying with geohash functions, but If there is a native alternative would be great!

Thanks!

mrackwitz commented 9 years ago

Realm doesn't bring such functionality built-in yet. But meanwhile there is a featured component ABFRealmMapView, which brings not only ABFLocationFetchRequest, but also integration with MapKit, if you're interested in that. The implementation of the mentioned class will be worthwhile to checkout.

mhergon commented 9 years ago

@mrackwitz @jpsim

Is there a prevision to add this functionality in the near future? A mobile database without this functionality loses much value.

Thank you!

jpsim commented 9 years ago

We absolutely want to add geo querying and sorting abilities to Realm in the future (see #2199 for some early work in progress too).

mhergon commented 9 years ago

@jpsim Ok, thanks!

Zhuinden commented 7 years ago

It is waiting for core in https://github.com/realm/realm-core/issues/1184

mhergon commented 7 years ago

Meanwhile https://github.com/mhergon/RealmGeoQueries

austinzheng commented 7 years ago

Just wanted to add another data point. http://stackoverflow.com/questions/41312433/how-to-do-geo-distance-sorting-on-realm-data-in-ios-objective-c/41351009

ianpward commented 1 year ago

Product for Realm & Device Sync here. I am interested in building this feature - I'd love to pick your bring on your use case if you're keen. If you could drop me a line at ian.ward@mongodb.com we can set up a time to chat.

dianaafanador3 commented 9 months ago

There is a new feature in the works which could help with this https://github.com/realm/realm-swift/pull/8390