I would like to query Drawing.objects(box__geo_within_box=[(-180, -90), (180, 90)])
Drawing.box
being a polygon of this type PolygonField()
initialized in the following way:
{ "type": "Polygon", "coordinates": [ [ [left, top], [right, top], [right, bottom], [left, bottom], [left, top] ] ] }
But it does not work (I get empty results). Maybe geo_within_box only works with points, not polygons?
How can I query all polygons inside a box?
Note: box__geo_intersects
only returns polygons which intersect the edges, not the ones inside the given polygon.