MongoDB $centerSphere vs Redis geospatial

344 views Asked by At

I want to show nearby places on the map for a given user. I can do so either by query MongoDB like this:

db.places.find( {
  loc: { $geoWithin: { $centerSphere: [ [ -88, 30 ], 10/3963.2 ] } }
} )

and either by query a Reids geospatial set like this:

georadius key longitude latitude 100 m 

Any pros and cons?

0

There are 0 answers