Geospatial queries polygons (doctrine2)
I would like to know if there is a way to execute polygons queries in PHP with doctrine2 and mongodb. (As seen in the doc : http://www.mongodb.org/display/DOCS/Geospatial+Indexing#GeospatialIndexing-BoundsQueries)
I know that the near, withinCenter and withinBox are possibles are implemented in Doctrine2 and work fine, but what about polygons ? http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/geospatial-queries.html
It does now :)
$queryBuilder ->field('loc') ->withinPolygon(array(0, 0), array(2, 0), array(0, 2));
See 60a99e5 and the corresponding unit test. An exception will be thrown if less than three points are provided, since that cannot express a polygon.