The circles in the bound queries are not a circle. I get some kind of square. A small sample to reproduce it:
db.places.save({ "loc" :
{ "x" : 4.9999, "y" : 52 } })
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.save({ "loc" :
})
db.places.ensureIndex(
)
radius=0.0001
center=[5,52]
db.places.find({"loc" : {"$within" :
}})
the result:
{ "_id" : ObjectId("4bb1f2f088df513435bcb4e1"), "loc" :
}
{ "_id" : ObjectId("4bb1f54383459c40223a8ae7"), "loc" :
}
{ "_id" : ObjectId("4bb1f54583459c40223a8aeb"), "loc" :
}
{ "_id" : ObjectId("4bb1f2e588df513435bcb4e0"), "loc" :
}
{ "_id" : ObjectId("4bb1f30888df513435bcb4e2"), "loc" :
}
{ "_id" : ObjectId("4bb1f54383459c40223a8ae8"), "loc" :
}
As you can see in the screenshot some points in the corners are highlighted and they shouldn't (distance between points is 0.0001)
The second screenshot is the result of a query with radius 0.0002. I expect some kind of circle shape, but I get a square.