DocumentDB 空间查询 - 多边形

DocumentDB Spatial Query - Polygon

我将多边形边界存储在一个集合中。

DocumentDB 能否对多边形数据执行空间查询,例如:我的点是否在多边形内?

例如SELECT * FROM root r WHERE ST_WITHIN({'type':'Point','coordinates':[1, 1]}, r.geometry)

这是我的文档:

{
  "id": "747941cfb829_1453640096710",
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          0,
          0
        ],
        [
          10,
          10
        ],
        [
          10,
          0
        ],
        [
          0,
          0
        ]
      ]
    ]
  }
}

谢谢

是的,虽然我没有仔细检查你的语法,但应该可以。