Skip to content

$centerSphere doesn't seem to be supported #368

Description

@adevore3

When using fongo I can verify that data is there if I use a MultiPolygon to simulate a sphere, by building a box, but when I run the centerSphere query I get no results. I increased the radius to make sure I wasn't barely missing the location either. Below are the 2 queries.

Returns results:
db.collection.find({ "loc" : { "$geoWithin" : { "$geometry" : { "type" : "MultiPolygon" , "coordinates" : [ [ [ [ -100.576294 , 62.081173] , [ -144.09404 , 62.081173] , [ -144.09404 , 33.134853] , [ -100.576294 , 33.134853] , [ -100.576294 , 62.081173]]]]}}}}).count();
3414

Doesn't return results:
db.collection.find({ "loc" : { "$geoWithin" : { "$centerSphere" : [ [ -122.33517 , 47.608013] , 0.2526042679057209]}}}).count();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions