<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:50:36 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-19328] $geoIntersects does not work as expected</title>
                <link>https://jira.mongodb.org/browse/SERVER-19328</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Collection content:&lt;br/&gt;
db.geotest.insert({&lt;br/&gt;
    &quot;geometry&quot; : &lt;/p&gt;
{  
        &quot;type&quot; : &quot;Polygon&quot;,  
        &quot;coordinates&quot; : [[[80,50],[90,50],[90,40],[80,40],[80,50]]]
	}
&lt;p&gt;})&lt;/p&gt;

&lt;p&gt;The following query does not return anything (the searched shape is totally within the polygon):&lt;br/&gt;
db.geotest.find({&lt;br/&gt;
    &quot;geometry&quot;:{&quot;$geoIntersects&quot;:{&quot;$geometry&quot;:{&quot;type&quot;:&quot;Polygon&quot;,&lt;br/&gt;
    &quot;coordinates&quot;:[[&lt;span class=&quot;error&quot;&gt;&amp;#91;10,60&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;160,60&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;160,20&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;10,20&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;10,60&amp;#93;&lt;/span&gt;]]&lt;br/&gt;
}}}});&lt;/p&gt;

&lt;p&gt;But when we shrink the polygon just a little (160-&amp;gt;150, the shape is still inside), we get the expected result:&lt;br/&gt;
db.geotest.find({&lt;br/&gt;
    &quot;geometry&quot;:{&quot;$geoIntersects&quot;:{&quot;$geometry&quot;:{&quot;type&quot;:&quot;Polygon&quot;,&lt;br/&gt;
    &quot;coordinates&quot;:[[&lt;span class=&quot;error&quot;&gt;&amp;#91;10,60&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;150,60&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;150,20&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;10,20&amp;#93;&lt;/span&gt;,&lt;span class=&quot;error&quot;&gt;&amp;#91;10,60&amp;#93;&lt;/span&gt;]]&lt;br/&gt;
}}}});&lt;/p&gt;

&lt;p&gt;I chose the values to be round and nice, but this appeared many times for the others and I did not find any pattern. I tested it on 3 different mongodb versions: 3.0.4, 2.6.5 and 2.6.9. I tested also with changing points order and custom crs. This example works with setting crs to &quot;urn:x-mongodb:crs:strictwinding:EPSG:4326&quot;, but I can find also other examples that failed. &lt;/p&gt;

&lt;p&gt;My case is filtering the polygons of countries borders by the visible area and on large polygons (but much smaller than half of the sphere) couple of countries was always missing in the result.&lt;/p&gt;

&lt;p&gt;I have no idea if I do sth wrong or this is a bug.&lt;/p&gt;</description>
                <environment></environment>
        <key id="215597">SERVER-19328</key>
            <summary>$geoIntersects does not work as expected</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="9">Done</resolution>
                                        <assignee username="sam.kleinman">Sam Kleinman</assignee>
                                    <reporter username="mjaworsk">Mateusz Jaworski</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Jul 2015 15:21:42 +0000</created>
                <updated>Thu, 9 Jul 2015 18:16:59 +0000</updated>
                            <resolved>Wed, 8 Jul 2015 18:18:10 +0000</resolved>
                                                                    <component>Geo</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="962424" author="samk" created="Thu, 9 Jul 2015 18:16:59 +0000"  >&lt;p&gt;We have a tool &lt;a href=&quot;https://geodndmap.mongodb.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://geodndmap.mongodb.com&lt;/a&gt; that you can drag geoJSON strings onto the window to plot geometries. Be aware, it doesn&apos;t handle invalid GeoJSON/geometries very well.&lt;/p&gt;</comment>
                            <comment id="961990" author="mjaworsk" created="Thu, 9 Jul 2015 11:13:25 +0000"  >&lt;p&gt;OMG. You are right. It is great that you will add this to documentation for other dummies like me.&lt;/p&gt;

&lt;p&gt;What did you use for making this map image with polygons?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;br/&gt;
Mateusz&lt;/p&gt;</comment>
                            <comment id="961362" author="samk" created="Wed, 8 Jul 2015 18:17:27 +0000"  >&lt;p&gt;I believe that this is an expected behavior and an effect of map distortion. I&apos;ve attached a plot of the points you describe, which I think illustrates your results. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-5199&quot; title=&quot;create geo best practice page.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-5199&quot;&gt;&lt;del&gt;DOCS-5199&lt;/del&gt;&lt;/a&gt; is a tracking ticket to clarify our documentation of geospatial indexes and queries. I&apos;m going to go ahead and close this ticket, but feel free to open a &lt;a href=&quot;https://www.mongodb.org/about/support/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;support&lt;/a&gt; request if you have additional questions. &lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
sam&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="174696">SERVER-16557</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="181268">SERVER-17092</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="81024" name="plot-server-19328.png" size="1321647" author="sam.kleinman" created="Wed, 8 Jul 2015 18:08:10 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 8 Jul 2015 17:05:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 31 weeks, 6 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>sam.kleinman</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 31 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>mjaworsk</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl133:</customfieldvalue>

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

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

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