#How to filter coordinates (Points) with given SW and NE Points?

13 messages · Page 1 of 1 (latest)

sour arrow
past dirge
#

Should work with a filter like this:

{
    "<field>": {
        "_intersects": {
          "type": "Point",
          "coordinates": [
            9.899107784782412,
            53.5894001
          ]
        }
    }
}
sour arrow
#

@past dirge you didn’t put the sw and ne points in your example.

#

I looked the query on directus Studio how they bound an area of a map. Seems to be a polygon with 5 points which creates a polygon area. I’ll provide a screenshot soon

past dirge
#

You want to filter by several points (area)?

#

In that case it would probably be something like this:

#
{
    "<field>": {
        "_intersects_bbox": {
           "type": "Polygon",
           "coordinates": [
              [
                12.34567,
                34.56789
              ],
              // ...
        ]
    ]
}
sour arrow
past dirge
#

Looks about right 👍

#

Does that work?

sour arrow
#

I'll test it now 🙂

sour arrow