<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:42:38 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>[CSHARP-2464] There is no way to specify the CRS using the Mongo C# driver</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2464</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I am using the Within query and I need to specify the CRS so that it works for &quot;big polygons&quot; so I have tired this:&lt;br/&gt;
&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; GeoJsonCoordinateReferenceSystem crs = new GeoJsonNamedCoordinateReferenceSystem(&quot;urn:x-mongodb:crs:strictwinding:EPSG:4326&quot;);&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; GeoJsonObjectArgs&amp;lt;GeoJson2DGeographicCoordinates&amp;gt; args = new GeoJsonObjectArgs&amp;lt;GeoJson2DGeographicCoordinates&amp;gt;();&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; args.CoordinateReferenceSystem = crs;&lt;br/&gt;
&#160;&lt;br/&gt;
and use it in this call:&lt;br/&gt;
&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160;IMongoQuery geoQuery = Query.Within&amp;lt;GeoJson2DGeographicCoordinates&amp;gt;(MongoItem.PolygonRegionProperty, new GeoJsonPolygon&amp;lt;GeoJson2DGeographicCoordinates&amp;gt;(args, new GeoJsonPolygonCoordinates&amp;lt;GeoJson2DGeographicCoordinates&amp;gt;(new GeoJsonLinearRingCoordinates&amp;lt;GeoJson2DGeographicCoordinates&amp;gt;(polygon.Select(i =&amp;gt; new GeoJson2DGeographicCoordinates(i.Longitude, i.Latitude))))));&lt;br/&gt;
&#160;&lt;br/&gt;
but this returns this:&lt;br/&gt;
&#160;&lt;br/&gt;
&quot;$geometry&quot; : { &quot;type&quot; : &quot;Polygon&quot;, &quot;crs&quot; : { &quot;type&quot; : &quot;name&quot;, &quot;properties&quot; : &lt;/p&gt;
{ &quot;name&quot; : &quot;urn:x-mongodb:crs:strictwinding:EPSG:4326&quot; }
&lt;p&gt; }, &quot;coordinates&quot; : [[&lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, -50.140853&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, 76.184997999999993&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;146.24300500000001, 76.184997999999993&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;146.24300500000001, -50.140853&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, -50.140853&amp;#93;&lt;/span&gt;]] } } }&lt;br/&gt;
&#160;&lt;br/&gt;
whereas I need this:&lt;br/&gt;
&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &quot;$geometry&quot; :{&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &quot;type&quot; : &quot;Polygon&quot;, &quot;coordinates&quot; : [[&lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, -50.140853&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;146.24300500000001, -50.140853&amp;#93;&lt;/span&gt;, [146.24300500000001,&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
76.184997999999993], &lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, 76.184997999999993&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, -50.140853&amp;#93;&lt;/span&gt;]],&#160; &#160;&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; crs: &lt;/p&gt;
{
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; type: &quot;name&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; properties: \{ name: &quot;urn:x-mongodb:crs:strictwinding:EPSG:4326&quot; }
&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; }&#160;&lt;br/&gt;
&#160; &#160; &#160; &#160; }&lt;br/&gt;
&#160;&lt;br/&gt;
i.e. the crs setting is in the wrong place and I cannot work out how to get it in the correct place. There is no way to set the CRS correctly using the within query.&lt;/p&gt;</description>
                <environment></environment>
        <key id="661575">CSHARP-2464</key>
            <summary>There is no way to specify the CRS using the Mongo C# driver</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="kelsey.schubert@mongodb.com">Kelsey Schubert</assignee>
                                    <reporter username="ihannah@meniscus.co.uk">Ian Hannah</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Dec 2018 21:06:08 +0000</created>
                <updated>Tue, 8 Jan 2019 16:37:59 +0000</updated>
                            <resolved>Tue, 8 Jan 2019 16:37:59 +0000</resolved>
                                                                    <component>Read Operations</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2108750" author="thomas.schubert" created="Tue, 8 Jan 2019 16:37:59 +0000"  >&lt;p&gt;Thanks for the update, I&apos;m glad you were able to figure out what the issue was.&lt;/p&gt;</comment>
                            <comment id="2100761" author="ihannah@meniscus.co.uk" created="Thu, 27 Dec 2018 09:53:01 +0000"  >&lt;p&gt;The query does work.&#160;This did not work because the coordinates were in clockwise order rather than counter-clockwise as is required for an inclusive area so this now works.&lt;/p&gt;

&lt;p&gt;The CRS can therefore be specified using the driver so this issue can be closed.&lt;/p&gt;</comment>
                            <comment id="2100734" author="ihannah@meniscus.co.uk" created="Thu, 27 Dec 2018 08:18:37 +0000"  >&lt;p&gt;Please note that the CRS can be specified using the C# driver BUT the query does not work when it is using the inclusive area.&#160;&lt;/p&gt;

&lt;p&gt;Can you please confirm that this is a bug? Can you please give me an update on exactly what the problem is?&lt;/p&gt;</comment>
                            <comment id="2100532" author="ihannah@meniscus.co.uk" created="Wed, 26 Dec 2018 22:24:55 +0000"  >&lt;p&gt;I have got the issue down to this query:&lt;/p&gt;

&lt;p&gt;db.items.find({&quot;GeoPol&quot;:{ &lt;br/&gt;
 &quot;$within&quot; : { &lt;br/&gt;
 &quot;$geometry&quot; :{ &lt;br/&gt;
 &quot;type&quot; : &quot;Polygon&quot;, &quot;coordinates&quot; : [[&lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, -50.140853&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, 76.184997999999993&amp;#93;&lt;/span&gt;, [146.24300500000001, &lt;br/&gt;
76.184997999999993], &lt;span class=&quot;error&quot;&gt;&amp;#91;146.24300500000001, -50.140853&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;-34.353119999999997, -50.140853&amp;#93;&lt;/span&gt;]], &lt;br/&gt;
 &quot;crs&quot;: &lt;/p&gt;
{
 &quot;type&quot;: &quot;name&quot;,
 &quot;properties&quot;: \{ &quot;name&quot;: &quot;urn:x-mongodb:crs:strictwinding:EPSG:4326&quot; }
&lt;p&gt; } &lt;br/&gt;
 }&lt;br/&gt;
 }&lt;br/&gt;
}&lt;br/&gt;
})&lt;/p&gt;

&lt;p&gt;The coordinates have been specified in a counter clockwise order which means that, together with the crs, this is an inclusive area.&lt;/p&gt;

&lt;p&gt;The coordinates of the polygon in the database is defined as:&lt;/p&gt;

&lt;p&gt;0.026856601145655,53.3536401702337;-0.018187415636542,53.3543968971421;-0.016935805565727,53.381347118852;-0.01651815359378,53.3903304943447;-0.001490628678547,53.390079813912;-0.001911439808241,53.3810965200027;0.028136611683245,53.3805896527841;0.026856601145655,53.3536401702337&lt;/p&gt;

&lt;p&gt;This is well inside the polygon in the query above so why is it not being matched?&lt;/p&gt;</comment>
                            <comment id="2100524" author="ihannah@meniscus.co.uk" created="Wed, 26 Dec 2018 22:10:55 +0000"  >&lt;p&gt;This does appear to work but it seems to depend on the order of the coordinates i.e. they must be clockwise or counter-clockwise. Can you please confirm?&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="661039">SERVER-38765</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu7kqf:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>