<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:33:26 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-76728] $box that spans the Antemeridian doesn&apos;t work as expected</title>
                <link>https://jira.mongodb.org/browse/SERVER-76728</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have a query that uses $box in a $geoWithin.&#160;&lt;/p&gt;

&lt;p&gt;I use Google Maps in my app, and whenever a user views a part of the map that spans across the Antemeridian (where part of the viewport is on one side of it and part of it on the other), we get incorrect results.&#160;&lt;br/&gt;
I found this SO issue that basically describes the same problem, but with no relevant answers: &lt;a href=&quot;https://stackoverflow.com/questions/71799194/bug-of-geowithin-box-mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://stackoverflow.com/questions/71799194/bug-of-geowithin-box-mongodb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. - Switching to a Polygon solves this, but it really makes sense for my app to use 2d rather than 2dsphere, and switching would also mean handling projection issues, and I couldn&apos;t find a Mongo recommended way of doing this.&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2329245">SERVER-76728</key>
            <summary>$box that spans the Antemeridian doesn&apos;t work as expected</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13202">Works as Designed</resolution>
                                        <assignee username="yuan.fang@mongodb.com">Yuan Fang</assignee>
                                    <reporter username="omer@gable.to">Omer Mizrahi</reporter>
                        <labels>
                            <label>Bug</label>
                    </labels>
                <created>Mon, 1 May 2023 19:26:36 +0000</created>
                <updated>Fri, 27 Oct 2023 13:51:37 +0000</updated>
                            <resolved>Wed, 19 Jul 2023 14:10:16 +0000</resolved>
                                    <version>6.0.5</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5585018" author="JIRAUSER1273620" created="Sun, 23 Jul 2023 07:24:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yuan.fang%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;yuan.fang@mongodb.com&quot;&gt;yuan.fang@mongodb.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Indeed you are correct, and when we use the $geometry operator we specify the CRS explicitly.&lt;/p&gt;

&lt;p&gt;But in this case we&apos;re not using the $geometry operator, we&apos;re using the $box operator, which has no way of setting CRS AFAIK.&lt;br/&gt;
For $geometry this requirement makes sense due to query being potentially vague, but &lt;b&gt;$box should be ordered&lt;/b&gt; according to the docs, so MongoDB can understand exactly what the query means.&lt;br/&gt;
(And for context, we don&apos;t want to use $geometry and Polygons because we want to query on a 2d plane)&lt;/p&gt;

&lt;p&gt;I hope this is clear enough.&lt;/p&gt;

&lt;p&gt;I still think this is a bug and would love to get your input.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Omer&lt;/p&gt;</comment>
                            <comment id="5576950" author="JIRAUSER1270794" created="Wed, 19 Jul 2023 14:09:46 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=omer%40gable.to&quot; class=&quot;user-hover&quot; rel=&quot;omer@gable.to&quot;&gt;omer@gable.to&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/#-big--polygons&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The MongoDB document regarding&quot;Big&quot; Polygons&lt;/a&gt; explains that:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;For&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/#mongodb-query-op.-geoWithin&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$geoWithin&lt;/tt&gt;&lt;/a&gt;, if you specify a single-ringed polygon that has an area greater than a single hemisphere, include&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/query/geometry/#mongodb-query-op.-geometry&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;the custom MongoDB coordinate reference system in the $geometry&lt;/tt&gt;&lt;/a&gt;&#160;expression; otherwise,&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/#mongodb-query-op.-geoWithin&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$geoWithin&lt;/tt&gt;&lt;/a&gt;&#160;queries for the complementary geometry.&#160;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;In the example you provided, the coordinates [ &lt;span class=&quot;error&quot;&gt;&amp;#91;142.8925, -67.9184&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-116.5788, -46.5688&amp;#93;&lt;/span&gt; ] cover locations that are present in both the eastern and western hemispheres, therefore, it is necessary to include the MongoDB coordinate reference system in the $geometry expression to get the expected result.&lt;/p&gt;

&lt;p&gt;If you have any further questions, we&apos;d like to encourage you to start by asking our community for help by posting on the &lt;a href=&quot;https://www.mongodb.com/community/forums&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Developer Community Forums&lt;/a&gt;. If the discussion there leads you to suspect a bug in the MongoDB server, then we&apos;d want to investigate it as a possible bug here in the SERVER project.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Yuan&lt;/p&gt;</comment>
                            <comment id="5568606" author="JIRAUSER1273620" created="Sat, 15 Jul 2023 10:14:38 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yuan.fang%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;yuan.fang@mongodb.com&quot;&gt;yuan.fang@mongodb.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The &quot;incorrect results&quot; are the same as in the StackOverflow issue. I get the &quot;inverse&quot; of the coordinates I ask for (meaning, for example, data between my latitude points, but everything that&apos;s NOT between my longitude points).&lt;/p&gt;

&lt;p&gt;Example query: `$box: [ &lt;span class=&quot;error&quot;&gt;&amp;#91;142.8925, -67.9184&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-116.5788, -46.5688&amp;#93;&lt;/span&gt; ]`.&lt;/p&gt;

&lt;p&gt;According to the docs, these should represent the &lt;b&gt;bottom left&lt;/b&gt; and &lt;b&gt;top right&lt;/b&gt; coordinates, but that&apos;s clearly not what happens here - it appears MongoDB treats this as if the coordinates represent &lt;b&gt;bottom right&lt;/b&gt; and &lt;b&gt;top left&lt;/b&gt;.&lt;/p&gt;</comment>
                            <comment id="5537090" author="JIRAUSER1270794" created="Fri, 30 Jun 2023 15:27:49 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=omer%40gable.to&quot; class=&quot;user-hover&quot; rel=&quot;omer@gable.to&quot;&gt;omer@gable.to&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for your report. To help us better understand the issue you encountered with &lt;tt&gt;$box&lt;/tt&gt;, could you please provide detailed steps to reproduce the problem? Additionally, kindly elaborate on what are the &quot;incorrect results&quot; and why it is not expected.&lt;/p&gt;

&lt;p&gt;If the problem you encountered is the same as the link you provided, I think the &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/#-big--polygons&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&quot;Big&quot; Polygons&lt;/a&gt; explains, as the polygon span across the eastern and western hemispheres.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Yuan&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2062104">SERVER-67025</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25137"><![CDATA[Server Triage]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 30 Jun 2023 15:27:49 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        28 weeks, 3 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            28 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>omer@gable.to</customfieldvalue>
            <customfieldvalue>yuan.fang@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i277g7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1pi28:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[yuan.fang@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i26tlj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>