我有以下模型:
class Item(Model):
lat_lng = PointField(geography=True, null=True)
Item.objects.create(lat_lng=Point(-95.864468, 36.075450))
bbox1 = (-168.3984375, 25.16517336866393, -52.03125, 75.32002523220804)
bbox2 = (-145.1953125, 25.16517336866393, -52.03125, 63.07486569058663)
bbox1
包含 bbox2
, 但是 Item.objects.filter(lat_lng__coveredby=Polygon.from_bbox(bbox1))
没有返回物品,而 Item.objects.filter(lat_lng__coveredby=Polygon.from_bbox(bbox2))
返回了物品。
我是否漏掉了什么?
更新:
如果我移除了 geographic=True
,那么一切都正常了。这个标志代表什么?