question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect handling geo-queries

See original GitHub issue

Query from client:

/api/v1/collection?query={
    "geometry": {
        "$geoIntersects": {
            "$geometry": {
                "type": "Polygon",
                "coordinates": [[
                    [16.14560058593753,51.307365718453234],
                    [18.02151611328128,51.307365718453234],
                    [18.02151611328128,50.79110589223593],
                    [16.14560058593753,50.79110589223593],
                    [16.14560058593753,51.307365718453234]
                ]]
            }
        }
    }
}

Inside of req._ermQueryOptions:

{
    "query": {
        "geometry": {
            "$geoIntersects": {
                "$geometry": {
                    "type": "Polygon",
                    "coordinates": {
                        "$in": [{
                            "$in": [{
                                "$in": [16.092042236328155,51.35713184352065]
                            },
                            {
                                "$in": [17.967957763671905,51.35713184352065]
                            },
                            {
                                "$in": [17.967957763671905,50.841430047612135]
                            },
                            {
                                "$in": [16.092042236328155,50.841430047612135]
                            },
                            {
                                "$in": [16.092042236328155,51.35713184352065]
                            }]
                        }]
                    }
                }
            }
        }
    }
}

Those $in operators are wrong 😃

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
muliyulcommented, May 11, 2016

I’m counting on you! I’ve tried to fix it but I couldn’t figure out how. By the way I’m not entirely sure this has anything to do with strings as I am sending my data as number and it is verified by the is-coordinates. I’m sending a query with the type param to specify a polygon type query and it looks like the query is being understood by ERM as something entirely different.

1reaction
Zertzcommented, May 3, 2016

Probably sometimes this week, but nothing is set in stone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Geo queries | Firestore - Firebase
Query Geohashes. Geohashes allow us to approximate area queries by joining a set of queries on the Geohash field and then filtering out...
Read more >
GEOquery and GEO issues
Hello all, I am trying to work with GEO data obtained via getGEO and am running into difficulties. The data retrieval is no...
Read more >
R session terminates with conflicted and GEOquery ... - GitHub
This looks like a problem with the GEOquery package - it's depending on a bunch of packages and not managing it's own imports...
Read more >
How to paginate geoqueries in Firebase Firestore?
Now the problem is.. Does anyone know how to paginate the results at a query level? Pagination would be extremely useful to reduce...
Read more >
Firestore geo-queries/hashing and it's limitations : r/Firebase
Pagination requires another orderBy operator, which won't work since I'm already using one for the geohashes. There are a lot of false positives ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found