0

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.

arthur.sw
  • 11,052
  • 9
  • 47
  • 104

1 Answers1

0

The problem is that I query "big" polygons.

box__geo_intersects works fine with polygons smaller than a single hemisphere.

arthur.sw
  • 11,052
  • 9
  • 47
  • 104