[SERVER-39657] BigPolygons $geoIntersects , areas greater than single hemisphere Created: 19/Feb/19 Updated: 27/Oct/23 Resolved: 06/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 4.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | PL [X] | Assignee: | Danny Hatcher (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Query 2019-08-12 | ||||||||
| Participants: | |||||||||
| Description |
|
Hi, { } |
| Comments |
| Comment by Danny Hatcher (Inactive) [ 06/Aug/19 ] | ||||||||
|
I've opened | ||||||||
| Comment by Craig Homa [ 08/Jul/19 ] | ||||||||
|
Scheduling into a sprint so someone can take a further look at what is really going on here. | ||||||||
| Comment by PL [X] [ 12/Mar/19 ] | ||||||||
|
Hi Eric,, your comment from 06 Mar 2019 06:39:09 PM solved my problem. | ||||||||
| Comment by Eric Sedor [ 06/Mar/19 ] | ||||||||
|
The SERVER project is for bug reports and feature requests. Unfortunately it is not the place for clarifying how MongoDB or geospatial coordinate reference systems work. Again, for support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. | ||||||||
| Comment by PL [X] [ 06/Mar/19 ] | ||||||||
|
Hi Eric, thank you for your answer,
To clarify, should I always use counter-clockwise winding order and "urn:x-mongodb:crs:strictwinding:EPSG:4326" CRS property? Can you confirm that If always using counter-clockwise winding order and if it is not a big polygon, MongoDB behaves as default CRS , regardless of specifying "urn:x-mongodb:crs:strictwinding:EPSG:4326" property in the query? and if it is a big polygon it behaves as expected?
I have no means of identifiying correctly big polygons (areas greater than a single hemisphere).
| ||||||||
| Comment by Eric Sedor [ 06/Mar/19 ] | ||||||||
|
MongoDB2018PB we are not seeing anything to indicate a bug yet. Please check out this blog for some guidance. One thing that may be leading you to see unexpected results is that the polygons in your queries are specified in clockwise winding order. For expected results with big polygons and the "urn:x-mongodb:crs:strictwinding:EPSG:4326" CRS, queries and data should use counter-clockwise winding order. But for support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. | ||||||||
| Comment by PL [X] [ 06/Mar/19 ] | ||||||||
|
Hi Eric,
Any news on this issue? It is really important as some developments depend on this MongoDB feature.
Best | ||||||||
| Comment by PL [X] [ 28/Feb/19 ] | ||||||||
I get the same number of countries whether I use "crs" or not. It could happen I would receive 25 countries with the polygon {{"[[[ -80.65646219998598 , 79.85312694622819] , [ 130.45321181416512 ,
and I get the intersection of the polygon with the LineString. So it might mean that instead of intersecting with the smallest rectangle in the map, it is intersecting with the biggest rectangle that includes the 25 countries. The thing is that if I use the crs I get the same results, 25 countries. So it does not make sense. | ||||||||
| Comment by Eric Sedor [ 27/Feb/19 ] | ||||||||
|
Thanks for all the information so far MongoDB2018PB. We're still investigating and appreciate your patience. | ||||||||
| Comment by PL [X] [ 25/Feb/19 ] | ||||||||
|
I enclose the document for the queries: REGIONS.json | ||||||||
| Comment by PL [X] [ 25/Feb/19 ] | ||||||||
|
Hi, I enclose a document. The first query returns all visible countries. The second query returns all countries (25) but the ones visible in the map. | ||||||||
| Comment by Eric Sedor [ 25/Feb/19 ] | ||||||||
|
MongoDB CRS should behave the same as the default CRS when the polygon is smaller than a single hemisphere. To investigate the possibility of a bug, we'd want to see a specific document that you expect to be returned for both of the above queries but which is only being returned for the first. Importantly, the SERVER project is for reporting bugs and feature requests. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. | ||||||||
| Comment by PL [X] [ 22/Feb/19 ] | ||||||||
|
If I make the following aggregation I get the intersection with all the countries visible in map:
When I rotate the map nearly 45º (using google maps) :
I no longer get the intersections. Why does not MongoDB identify the intersections if they are included in the coordinates | ||||||||
| Comment by PL [X] [ 21/Feb/19 ] | ||||||||
|
Hi, I wanted to know if the custom Crs strict winding has the same behavior as the default crs when the area is less than a single hemisphere ,i.e., if it changes the behavior to default in areas less than single hemisphere . I am also working with google maps and if I rotate the map more than 15 degrees mongodb does not intersect the google map GeoJsonPolygon with the areas kept in database when I use geointersects. How to know if the fence is greater than a single hemisphere ? I have an app making requests to mongodb database and if I need to know beforehand if the area exceeds an hemisphere it will not be accurate because I have no exact means is calculating the exact area of the GeoJsonPolygon. Mongo driver 3.10.1 , dB.version() 4.0.0. | ||||||||
| Comment by Eric Sedor [ 21/Feb/19 ] | ||||||||
|
Thanks for writing in. We have a few questions: Can you clarify what MongoDB version you are running? Do we understand correctly that you are observing a case in which "If the specified polygon is smaller than a single hemisphere, the behavior of $geoIntersects with the MongoDB CRS is the same as with the default CRS." is not accurate? Are you able to provide a specific operation and the results you are observing that you don't expect? |