Skip to content

Request: PyEve supporting $centerSphere operator #1181

@Irene-GM

Description

@Irene-GM

Hi,

I wonder whether it is possible for the Py-Eve developer community to include support for the $centerSphere operator via HTTP, so we can build spatial queries with a search radius and fetch the associated data from a Mongo database. This question was originally asked in SO, and following the suggestion of a user, I decided to make this request.


Expected Behavior

The following query is possible in a Mongo console environment:

db.ObsStationTemp.find({geometry:{$geoWithin:{$centerSphere:[[4.925922,51.969035],2/3963.2]}}})

So its equivalent in HTTP should pull the same set of values from the Mongo database:

 http://127.0.0.1:5000/ObsStationTemp?where={"geometry": {"$geoWithin": {"$centerSphere": [ [4.92592, 51.969035],0.02]}}}

Actual Behavior

However, the Eve server replies as follows:

{
   "_status": "ERR",
   "_error": {
       "code": 400,
       "message": "Query contains unknown or unsupported operators: $centerSphere"
   }
}

Because it seems that the $centerSphere is not yet supported in PyEve 0.8.
Are there any plans to include this operator in a new release of PyEve?
Thanks for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions