Hello Community,
I’m having trouble with geographic filtering in Directus and hope you can help me out!
My Situation:
I have a collection with items that each have a location
field (Geometry/Point). The data looks like this:
{
"data": [
{
"id": 5,
"title": "Test 1",
"address": "Johannisberger Straße, Berlin",
"location": {
"coordinates": [13.3108006, 52.4692396],
"type": "Point"
}
},
{
"id": 6,
"title": "Test 2",
"address": "Saßnitzer Straße, Berlin",
"location": {
"coordinates": [13.2913654, 52.4728478],
"type": "Point"
}
}
// ... more items
]
}
What I want to achieve:
I want to get only the items that are within a 10km radius around specific coordinates:
- Center:
52.488738587941015, 13.299292557084074
- Radius: 10 kilometers
What I’ve already tried:
?filter[location][_intersects]=circle(13.299292557084074,52.488738587941015,10000)
Unfortunately, this doesn’t work. I get no results back, even though there should definitely be items within the radius.