I have the following model:
class DbObjectWithCoordinates(Document):
coordinates = GeoPointField() # this used to work with mongengine
I used the mongoengine.GeoPointField to perform queries like find all objects near to given coordinates:
user_coordinates = user.coordinates
objects_of_interest = DbObjectWithCoordinates.objects(coordinates__near=user_coordinates, coordinaes_max_distance=3)
Howewer the GeoPointField field is not available in motorengine.
Is it possible to define objects and use queries like this with motorengine? And if not is there a workaround for this kind of use case?
I think it would be fairly easy to implement geopoint field. Below is very simple implementation offcourse it is not a full one.
But you need to be sure that the motorengine operators are updated properly before geo query.