<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:43 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>[JAVA-3074] Can&apos;t extract geo keys - Reason: can&apos;t project geometry into spherical CRS</title>
                <link>https://jira.mongodb.org/browse/JAVA-3074</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;em&gt;I&apos;m using java code to insert a new record to DB document which is&lt;/em&gt; worker &lt;em&gt;(user) and has its location&apos;s address defined with text fields and location field contains lat/_lng _coordinates.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Worker result = this.workerRepository.&lt;b&gt;insert&lt;/b&gt;(worker);&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;ins&gt;Involved fields and their definitions:&lt;/ins&gt;&lt;/p&gt;

&lt;p&gt;public interface WorkerRepository extends MongoRepository&amp;lt;Worker, String&amp;gt;&lt;/p&gt;

&lt;p&gt;worker&apos;s location field:&lt;/p&gt;

&lt;p&gt;/** The location. */&lt;br/&gt;
@NotNull&lt;br/&gt;
@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)&lt;br/&gt;
private PlacePoint location;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Getting the exception for &lt;font color=&quot;#FF0000&quot;&gt;SPECIFIC CITY&lt;/font&gt;&#160;(despite all, I saw this exception with other addresses, but currently don&apos;t have logs): &lt;b&gt;Krasnoyarsk&lt;/b&gt; or &lt;b&gt;&#1050;&#1088;&#1072;&#1089;&#1085;&#1086;&#1103;&#1088;&#1089;&#1082;&lt;/b&gt; (lat/lng coordinates have been provided by Google geoCode API):&#160;&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#FF0000&quot;&gt;&lt;b&gt;can&apos;t project geometry into spherical CRS: { lat: 56.0126925,&lt;/b&gt; &lt;/font&gt;lng&lt;font color=&quot;#FF0000&quot;&gt;&lt;b&gt;: 92.922417 }&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The full exception will attach to the ticket. Please ignore ??? in some fields, it is deal only of printing.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>JBOSS WildFly 13 + Springboot 2.0.3.Release</environment>
        <key id="630141">JAVA-3074</key>
            <summary>Can&apos;t extract geo keys - Reason: can&apos;t project geometry into spherical CRS</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="walkmypet">Vladimir B</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Nov 2018 14:36:17 +0000</created>
                <updated>Wed, 11 Sep 2019 19:09:51 +0000</updated>
                            <resolved>Thu, 8 Nov 2018 20:56:10 +0000</resolved>
                                                                    <component>Write Operations</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2057124" author="walkmypet" created="Fri, 9 Nov 2018 15:15:23 +0000"  >&lt;p&gt;10x for your help! It is what you pointed to: order of coordinates. It should be lng&#160;as first, and next is lat.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="2056661" author="thomas.schubert" created="Thu, 8 Nov 2018 22:27:04 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=walkmypet&quot; class=&quot;user-hover&quot; rel=&quot;walkmypet&quot;&gt;walkmypet&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;lat=32.0852999, lng=34.78176759999997 are both less than 90 degrees, so neither would through an error despite being parsed to the wrong values.&#160;Krasnoyarsk, Russia is just above 90 degrees in longitude, consequently when the document is inserted in way that causes mongod to parse this value as a latitude, it throws an error since latitude may not exceed 90 degrees. This explains your observation that any locations further east in your application fail to be inserted.&lt;/p&gt;

&lt;p&gt;Please note that the JAVA project is for reporting bugs or feature suggestions for the MongoDB Java Driver. For MongoDB-related support discussion please post on the &lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user group&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com/questions/tagged/mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stack Overflow with the &lt;tt&gt;mongodb&lt;/tt&gt; tag&lt;/a&gt;. A question like this involving more discussion would be best posted on the mongodb-users group.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Kelsey&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2056599" author="walkmypet" created="Thu, 8 Nov 2018 21:30:52 +0000"  >&lt;p&gt;Hi, Kelsey.&lt;/p&gt;

&lt;p&gt;Thank you for your investigation. But I feel, that there is another cause. There are &lt;b&gt;3 reasons.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;1) Look at the highlighted text in my ticket:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Getting the exception for&#160;&lt;font color=&quot;#ff0000&quot;&gt;SPECIFIC CITY&lt;/font&gt;&#160;(despite all, I saw this exception with other addresses, but currently don&apos;t have logs):&#160;&lt;b&gt;Krasnoyarsk&lt;/b&gt;&#160;or&#160;&lt;b&gt;&#1050;&#1088;&#1072;&#1089;&#1085;&#1086;&#1103;&#1088;&#1089;&#1082;&lt;/b&gt;&#160;(lat/_lng _coordinates have been provided by Google geoCode API):&lt;/em&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;font color=&quot;#ff0000&quot;&gt;&lt;b&gt;can&apos;t project geometry into spherical CRS: { lat: 56.0126925,&lt;/b&gt;&lt;/font&gt;&lt;/em&gt;&#160;lng_&lt;font color=&quot;#ff0000&quot;&gt;&lt;b&gt;: 92.922417 }&lt;/b&gt;&lt;/font&gt;_&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#0747a6&quot;&gt;2) My comment since today&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;_&lt;font color=&quot;#0747a6&quot;&gt;I have added two more exceptions with the same problem. &lt;font color=&quot;#de350b&quot;&gt;&lt;/font&gt;&lt;b&gt;Looks like, we cannot insert to DB any address that located eastern from Krasnoyarsk, Russia&lt;/b&gt;&lt;/font&gt;.&lt;font color=&quot;&quot;&gt;_&lt;br/&gt;
&lt;br/&gt;
&lt;font color=&quot;#0747a6&quot;&gt;&lt;/font&gt;3) Another request with address location that&apos;s working properly. And having lat at the first place!&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;_&lt;font color=&quot;#0747a6&quot;&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;DEBUG&amp;#93;&lt;/span&gt; 2018-11-08 23:18:29.947 &lt;span class=&quot;error&quot;&gt;&amp;#91;http-nio-8080-exec-2&amp;#93;&lt;/span&gt; RequestResponseBodyMethodProcessor - Written [Worker(type=&lt;span class=&quot;error&quot;&gt;&amp;#91;SITTER&amp;#93;&lt;/span&gt;, title=?????, dob=Wed Nov 08 23:18:02 IST 2000, gender=m, addresses=&lt;span class=&quot;error&quot;&gt;&amp;#91;Place(id=1, type=PRIMARY, radius=0.0, country=???????, region=????-???????? ?????, city=????-????, county=null, street=null, houseNum=null, placeId=ChIJH3w7GaZMHRURkD-WwKJy-8E, formattedAddress=????-????, ???????, &lt;font color=&quot;#de350b&quot;&gt;&lt;/font&gt;*location=Place.PlacePoint(lat=32.0852999, lng=34.78176759999997))&amp;#93;&lt;/span&gt;*,&lt;/font&gt; pictures=null, supportedPets=null, attainments=null, additionalInfo=null, prices=null, quizzes=null)] as &quot;application/json&quot; using &lt;span class=&quot;error&quot;&gt;&amp;#91;org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@1b07ea1f&amp;#93;&lt;/span&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;DEBUG&amp;#93;&lt;/span&gt; 2018-11-08 23:18:29.949 &lt;span class=&quot;error&quot;&gt;&amp;#91;http-nio-8080-exec-2&amp;#93;&lt;/span&gt; DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name &apos;dispatcherServlet&apos;: assuming HandlerAdapter completed request handling&lt;font color=&quot;&quot;&gt;_&lt;br/&gt;
&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;br/&gt;
&lt;font color=&quot;#0747a6&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;b&gt;I&apos;m asking to reopen the ticket and check again, please&lt;/b&gt;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2056539" author="thomas.schubert" created="Thu, 8 Nov 2018 20:56:10 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=walkmypet&quot; class=&quot;user-hover&quot; rel=&quot;walkmypet&quot;&gt;walkmypet&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Looking at the errors that you&apos;ve provided. It appears that your are using &lt;a href=&quot;https://docs.mongodb.com/manual/geospatial-queries/#legacy-coordinate-pairs&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;legacy coordinate pairs with embedded documents&lt;/a&gt;. Note that when you use embedded documents for coordinate pairs, the ordering matters from the linked documentation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If specifying latitude and longitude coordinates, the first field, regardless of the field name, must contains the longitude value and the second field, the latitude value ; i.e.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;As &lt;tt&gt;lng&lt;/tt&gt; is the second field, MongoDB interprets it as the latitude. Since this value is greater than 90, it throws an error. To resolve this issue, I would suggest using GeoJSON objects, or more simply reordering the fields in this embedded document.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Kelsey &lt;/p&gt;</comment>
                            <comment id="2055416" author="walkmypet" created="Thu, 8 Nov 2018 09:08:04 +0000"  >&lt;p&gt;I have added two more exceptions with the same problem. Looks like, we cannot insert to DB any address that located eastern from Krasnoyarsk, Russia.&lt;/p&gt;

&lt;p&gt;It&apos;s weird!&lt;/p&gt;

&lt;p&gt;Appreciate your work and waiting for news...&lt;/p&gt;</comment>
                            <comment id="2054443" author="jeff.yemin" created="Wed, 7 Nov 2018 14:39:21 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=walkmypet&quot; class=&quot;user-hover&quot; rel=&quot;walkmypet&quot;&gt;walkmypet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sorry to hear you&apos;re having trouble.  However, until we get more information I&apos;m going to change the issue type to Question and lower the priority to Major.&lt;/p&gt;

&lt;p&gt;Someone will follow up with a request for additional information.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="200534" name="exception 3.txt" size="3936" author="walkmypet" created="Thu, 8 Nov 2018 09:05:50 +0000"/>
                            <attachment id="200458" name="exception.txt" size="17700" author="walkmypet" created="Wed, 7 Nov 2018 14:35:43 +0000"/>
                            <attachment id="200535" name="exception2.txt" size="2295" author="walkmypet" created="Thu, 8 Nov 2018 09:05:51 +0000"/>
                    </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|hu2hcf:</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>