<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:20:08 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-9346] Cannot query world with 2dsphere index</title>
                <link>https://jira.mongodb.org/browse/SERVER-9346</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have stored some GeoJSON points in a collection, created a 2dsphere index.  When I query the world I do not get back any of the points I created.  I was not sure if the polygon had to be drawn in a certain direction (clockwise, counterclockwise), I tried both ways with no luck.&lt;/p&gt;</description>
                <environment>OSX</environment>
        <key id="71713">SERVER-9346</key>
            <summary>Cannot query world with 2dsphere index</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="9">Done</resolution>
                                        <assignee username="hari.khalsa@10gen.com">hari.khalsa@10gen.com</assignee>
                                    <reporter username="newmanw">William Newman</reporter>
                        <labels>
                            <label>geo</label>
                    </labels>
                <created>Sat, 13 Apr 2013 14:37:18 +0000</created>
                <updated>Sat, 9 Jul 2016 21:09:12 +0000</updated>
                            <resolved>Thu, 25 Apr 2013 16:43:21 +0000</resolved>
                                    <version>2.4.1</version>
                                                    <component>Geo</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="321500" author="hari.khalsa@10gen.com" created="Thu, 25 Apr 2013 16:43:21 +0000"  >&lt;p&gt;MongoDB always assumes polygons are &amp;lt; hemisphere.  Docs updated to mention this.&lt;/p&gt;</comment>
                            <comment id="316739" author="newmanw" created="Fri, 19 Apr 2013 01:35:58 +0000"  >&lt;p&gt;Dan, I read the same thing I think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;4.2.3.3.	&lt;br/&gt;
What is the longest arc you can process?&lt;/p&gt;

&lt;p&gt;We use great circle arcs as the &quot;interpolation line&quot; between two points. That means any two points are actually joined up two ways, depending on which direction you travel along the great circle. All our code assumes that the points are joined by the &lt;b&gt;shorter&lt;/b&gt; of the two paths along the great circle. As a consequence, shapes that have arcs of more than 180 degrees will not be correctly modeled.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Which lead me to check out how PostGIS handled queries. I think in this case they are referring polygons stored/indexed in the database, not bounding polygons used to query.&lt;/p&gt;

&lt;p&gt;Its also worth noting that drawing the polygon in either direction using PostGIS resulted in the correct behavior.&lt;/p&gt;

&lt;p&gt;The bummer is that I could find nothing in their documentation stating the direction in which a bounding polygon should be drawn.&lt;/p&gt;

&lt;p&gt;Also thanks a ton for updating the docs!&lt;/p&gt;</comment>
                            <comment id="316650" author="dan@10gen.com" created="Thu, 18 Apr 2013 22:08:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=newmanw&quot; class=&quot;user-hover&quot; rel=&quot;newmanw&quot;&gt;newmanw&lt;/a&gt;, I pasted the wrong link in the &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-1391&quot; title=&quot;2dsphere bounding polygon must be &amp;lt;= hemisphere &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-1391&quot;&gt;&lt;del&gt;DOCS-1391&lt;/del&gt;&lt;/a&gt; comment for postgis.  I was referring to this item in their &lt;a href=&quot;http://postgis.net/docs/using_postgis_dbmanagement.html#id358043&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;FAQ&lt;/a&gt;.  I guess (from your examples) they are enforcing a clockwise winding of the points, but I can&apos;t find references to this in the docs.&lt;/p&gt;</comment>
                            <comment id="316538" author="newmanw" created="Thu, 18 Apr 2013 19:58:45 +0000"  >&lt;p&gt;From &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-1391&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/DOCS-1391&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&apos;Neither SQL Server nor PostGIS handle &amp;gt; 180&#176; bounding polygons. aka, the &quot;hemisphere limitation&quot;&apos;&lt;/p&gt;

&lt;p&gt;I do not think that is true.  PostGIS may limit the size of indexed polygons but does not limit polygons when querying.&lt;/p&gt;

&lt;p&gt;Here are a couple examples of different queries in PostGIS.&lt;/p&gt;

&lt;p&gt;&amp;#8211; get all rows from feature table (just one for now)&lt;br/&gt;
SELECT feature_id, feature_name, ST_AsText(feature_geom) FROM feature;&lt;br/&gt;
 feature_id |  feature_name  |         st_astext          &lt;br/&gt;
-----------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;--------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;---------------------------&lt;br/&gt;
          1 | Feature Test 1 | POINT(71.060316 48.432044)&lt;br/&gt;
(1 row)&lt;/p&gt;

&lt;p&gt;&amp;#8211; get all rows over the world with envelope&lt;br/&gt;
SELECT feature_id, feature_name, ST_AsText(feature_geom) FROM feature WHERE feature.feature_geom &amp;amp;&amp;amp; ST_MakeEnvelope(-180,-90,180,90, 4326);&lt;br/&gt;
 feature_id |  feature_name  |         st_astext          &lt;br/&gt;
-----------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;--------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;---------------------------&lt;br/&gt;
          1 | Feature Test 1 | POINT(71.060316 48.432044)&lt;br/&gt;
(1 row)&lt;/p&gt;

&lt;p&gt;&amp;#8211; get all rows over the world with geometry&lt;br/&gt;
SELECT feature_id, feature_name, ST_AsText(feature_geom) FROM feature WHERE feature.feature_geom &amp;amp;&amp;amp; ST_MakePolygon(ST_GeomFromText(&apos;LINESTRING(-180 -90,180 -90,180 90,-180 90, -180 -90)&apos;));&lt;br/&gt;
 feature_id |  feature_name  |         st_astext          &lt;br/&gt;
-----------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;--------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;---------------------------&lt;br/&gt;
          1 | Feature Test 1 | POINT(71.060316 48.432044)&lt;br/&gt;
(1 row)&lt;/p&gt;

&lt;p&gt;&amp;#8211; sanity check with smaller polygon&lt;br/&gt;
SELECT feature_id, feature_name, ST_AsText(feature_geom) FROM feature WHERE feature.feature_geom &amp;amp;&amp;amp; ST_MakePolygon(ST_GeomFromText(&apos;LINESTRING(-180 -90,-170 -90,-170 90,-180 90, -180 -90)&apos;));&lt;br/&gt;
 feature_id | feature_name | st_astext &lt;br/&gt;
-----------&lt;del&gt;&lt;ins&gt;&lt;/del&gt;------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;----------&lt;br/&gt;
(0 rows)&lt;/p&gt;</comment>
                            <comment id="315898" author="newmanw" created="Thu, 18 Apr 2013 01:37:30 +0000"  >&lt;p&gt;Thanks Hari!&lt;/p&gt;

&lt;p&gt;Some discussion here as well:&lt;br/&gt;
&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/D7ZMWdUnR5U&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/D7ZMWdUnR5U&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="314708" author="hari.khalsa@10gen.com" created="Tue, 16 Apr 2013 17:20:32 +0000"  >&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;All geometries must fit within a hemisphere.  If a geometry is &quot;bigger&quot; than a hemisphere, we interpret the geometry as the complimentary shape that is smaller.  This is why your query isn&apos;t returning any results: we think you&apos;re asking for points in a very small area, where there probably are no points.&lt;/p&gt;

&lt;p&gt;Think about a small polygon, say a little box, on the earth.  This really defines two areas: the area inside the polygon, and the area outside of it.  If you make this box bigger, say, bigger than half the earth, we&apos;re not sure which area you really want, so we choose the smallest area.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="71728">DOCS-1391</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 14 Apr 2013 23:04:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 42 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 42 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10021"><![CDATA[OS X]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>hari.khalsa@10gen.com</customfieldvalue>
            <customfieldvalue>newmanw</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmx3z:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>49487</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;db.features.insert({loc: &lt;/p&gt;
{type: &quot;Point&quot;, coordinates: [10, 10] }
&lt;p&gt; } );&lt;br/&gt;
db.features.ensureIndex(&lt;/p&gt;
{&quot;loc&quot;: &quot;2dsphere&quot;}
&lt;p&gt;);&lt;br/&gt;
db.features.find( {loc: { $geoWithin: { $geometry: &lt;/p&gt;
{ type: &quot;Polygon&quot;, coordinates: [ [ [-180,-90], [180,-90], [180,90], [-180,90], [-180,-90] ] ] }
&lt;p&gt; } } });&lt;/p&gt;</customfieldvalue>

                        </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|hs43o7:</customfieldvalue>

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