Reputation: 59
My previous question is here DocumentDB Spatial Query - Odd Result
Now the query below won't return the document.
SELECT * FROM root r WHERE ST_WITHIN({'type':'Point','coordinates':[3.5, 8.2]}, r.geometry)
This is my amended document:
{
"id": "747941cfb829_1453640096710",
"geometry": {
"type": "Polygon",
"coordinates": [[[0,
0],
[10,
0],
[10,
10],
[0,
0]]]
},
"name": "name"}
How do I return this document? Thanks in advance
Upvotes: 0
Views: 135
Reputation: 9523
Your polygon is a triangle and the point you specify in your query is outside of that triangle. Try [8.2, 3.5].
Upvotes: 1