[SERVER-45189] Allow strictwinding property also for inserted geometries ( or support geojson standard rfc7946) Created: 17/Dec/19 Updated: 27/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Damiano Barboni | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | qexec-team, qi-geo, query-product-urgency-3, query-product-value-2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Integration
|
||||||||||||||||||||||||
| Sprint: | Query 2020-11-30, Query 2020-12-14, Query 2020-12-28, Query 2021-01-11, Query 2021-01-25, Query Execution 2021-02-22 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
(current description extracted from a comment below The problem is that currently "urn:x-mongodb:crs:strictwinding:EPSG:4326" is available only for $geoWithin and $geoIntersects, as mentioned on the documentation https://docs.mongodb.com/manual/reference/operator/query/geometry/ I can not specify this property when i insert a polygon and consequently i can not load on the database polygons larger than 180deg Let me provide an example of what, in my opinion, should be useful to have
Te query above return the erro:
If I omit the crs declaration the insert works but the polygon is not considered counterclockwise
Example: search polygon over Europe return nothing
Example search polygon over America return a record but is not expected, the inserter counterclockwise polygon is over aurope/asia
This appends every time I insert a polygon larger than 180deg. Mongo always close the ring considering the shorter way and i didn't find the possibility to force direction counterclockwise original descriptionThe latest geoJson standart rfc7946 define unambiguously how the polygon winding order have to be interpreted. With mongodb is not possible to insert polygon bigger than a single hemisphere and the property { name: "urn:x-mongodb:crs:strictwinding:EPSG:4326" } can be specified only for the $geoWithin and $geoIntersects operators It could be useful to support the rfc7946 standard and allow operators to specify this property when a new geometry is inserted or extend the existing "strictwinding" prototype also for inserted data and not only for the query operators. |
| Comments |
| Comment by Xiaochen Wu [ 24/Feb/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
discussed in product triage. send it to backlog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 14/Feb/20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for your patience Damiano, After consideration we've opted to close Gratefully, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 30/Dec/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for clarifying Damiano. I am investigating this ticket's relation to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Damiano Barboni [ 19/Dec/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dear Eric, Thanks for your response Mention the geojson standard rfc7946 introduce confusion and tickets have to be more atomic and focused. The problem is that currently "urn:x-mongodb:crs:strictwinding:EPSG:4326" is available only for $geoWithin and $geoIntersects, as mentioned on the documentation https://docs.mongodb.com/manual/reference/operator/query/geometry/ I can not specify this property when i insert a polygon and consequently i can not load on the database polygons larger than 180deg Let me provide an example of what, in my opinion, should be useful to have
Te query above return the erro:
If I omit the crs declaration the insert works but the polygon is not considered counterclockwise
Example: search polygon over Europe return nothing
Example search polygon over America return a record but is not expected, the inserter counterclockwise polygon is over aurope/asia
For mongo the inserted polygon is "on the other side" of the globe. This appends every time I insert a polygon larger than 180deg. Mongo always close the ring considering the shorter way and i didn't find the possibility to force direction counterclockwise Damiano Tested with MongoDB server version: 4.2.1
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Sedor [ 18/Dec/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi barboni@meeo.it, I'd like to try to clarify part of this request. Are you asking for an insert option to specify a CRS? If so, what behavior are you requesting? Given that rfc7946 specifies that "parsers SHOULD NOT reject Polygons that do not follow the right-hand rule." I'd like to understand what is missing when the currently available "urn:x-mongodb:crs:strictwinding:EPSG:4326" is provided. For example, are there specific geospatial operators that are performing incorrectly for you given counterclockwise data and counterclockwise queries? I think part of the ambiguity is that the ordering requirement of the spec is not explicitly represented in the data. We do have What do you think? Sincerely, |