<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:21:23 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-9764] Save Google Map Polygon cordinates in MongoDB 2dsphere Index</title>
                <link>https://jira.mongodb.org/browse/SERVER-9764</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;I had generated Polygon coordinates from Google map and try to save it to mongodb GEO spatial index with 2dsphere and I&apos;m getting following error.&lt;/p&gt;

&lt;p&gt;&quot;Can&apos;t extract geo keys from object, malformed geometry.&quot;&lt;/p&gt;

&lt;p&gt;My coordinates are as follow and I had validated it with &lt;a href=&quot;http://geojsonlint.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://geojsonlint.com/&lt;/a&gt;&lt;/p&gt;

{&quot;type&quot;:&quot;Polygon&quot;,&quot;coordinates&quot;:[[[79.6728515625,8.189742344383703],[80.15625,10.09867012060338],[82.265625,6.926426847059551],[80.5078125,5.528510525692801]]]}

&lt;p&gt;Cheers&lt;/p&gt;

&lt;p&gt;Prabath&lt;/p&gt;</description>
                <environment>Ubuntu 12.04 32bit version with MongoDB 2.4.3</environment>
        <key id="76305">SERVER-9764</key>
            <summary>Save Google Map Polygon cordinates in MongoDB 2dsphere Index</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="hari.khalsa@10gen.com">hari.khalsa@10gen.com</assignee>
                                    <reporter username="prabath321">Prabath Kumarasinghe</reporter>
                        <labels>
                            <label>indexing</label>
                    </labels>
                <created>Thu, 23 May 2013 06:18:52 +0000</created>
                <updated>Sat, 9 Jul 2016 21:09:18 +0000</updated>
                            <resolved>Sat, 25 May 2013 00:43:38 +0000</resolved>
                                    <version>2.4.3</version>
                                                    <component>Geo</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="348683" author="prabath321" created="Thu, 30 May 2013 09:42:32 +0000"  >&lt;p&gt;Finally, it worked in the following way, thanks to one of my colleagues and you, add an extra coordinate at the end which equal to first coordinate to Google Map polygon.&lt;/p&gt;

{&quot;type&quot;:&quot;Polygon&quot;,&quot;coordinates&quot;:[[[79.6728515625,8.189742344383703],[80.15625,10.09867012060338],[82.265625,6.926426847059551],[80.5078125,5.528510525692801],[79.6728515625,8.189742344383703]]]} 

&lt;p&gt;What I did was wrong dropping the last coordinate rather than increasing. Thanks for the help.&lt;/p&gt;</comment>
                            <comment id="348651" author="prabath321" created="Thu, 30 May 2013 08:37:02 +0000"  >&lt;p&gt;Following data is shown in Google Map as a Polygon. &lt;/p&gt;

{&quot;type&quot;:&quot;Polygon&quot;,&quot;coordinates&quot;:[[[79.6728515625,8.189742344383703],[80.15625,10.09867012060338],[82.265625,6.926426847059551],[80.5078125,5.528510525692801]]]}

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;27385_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/27385/27385_ploygon.jpg&quot; title=&quot;ploygon.jpg&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;27385&quot; file-preview-title=&quot;ploygon.jpg&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/27385/_thumb_27385.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;Once I connect the first point to last point then it shows in Google Map as a triangle. But I can save this in MongoDB, because first and last coordinates are same.&lt;/p&gt;
{&quot;type&quot;:&quot;Polygon&quot;,&quot;coordinates&quot;:[[[79.6728515625,8.189742344383703],[80.15625,10.09867012060338],[82.265625,6.926426847059551],[79.6728515625,8.189742344383703]]]}

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;27386_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/27386/27386_triangle.jpg&quot; title=&quot;triangle.jpg&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;27386&quot; file-preview-title=&quot;triangle.jpg&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/27386/_thumb_27386.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;</comment>
                            <comment id="347922" author="hari.khalsa@10gen.com" created="Wed, 29 May 2013 14:29:35 +0000"  >&lt;p&gt;I&apos;m not sure what you mean exactly by it not looking the same in Google Maps.  Can you provide a set of links or images?&lt;/p&gt;</comment>
                            <comment id="345274" author="prabath321" created="Sat, 25 May 2013 11:27:53 +0000"  >&lt;p&gt;Above data is in longitude, latitude combination. Then at the client side I use following library which is recommend in Google map v3 doc, in that code also latitude, longitude swapping is maintained.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/JasonSanford/GeoJSON-to-Google-Maps&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/JasonSanford/GeoJSON-to-Google-Maps&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It says GeoJSON-&amp;gt;&quot;Google Maps&quot;, do we need vise-versa &quot;Google Maps&quot;-&amp;gt;GeoJSON. &lt;/p&gt;</comment>
                            <comment id="345176" author="hari.khalsa@10gen.com" created="Sat, 25 May 2013 05:38:49 +0000"  >&lt;p&gt;Google Maps uses latitude, longitude.  GeoJSON is longitude, latitude.  Does it work if you swap the coordinates?&lt;/p&gt;</comment>
                            <comment id="345135" author="prabath321" created="Sat, 25 May 2013 03:22:05 +0000"  >&lt;p&gt;Once first and last points are same then it gives different shape in google map. Is there is any algorithm to convert google map coordinates into GeoJSON LinearRing.&lt;/p&gt;</comment>
                            <comment id="345081" author="hari.khalsa@10gen.com" created="Sat, 25 May 2013 00:43:24 +0000"  >&lt;p&gt;geojsonlint.com doesn&apos;t do a very good job &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;

&lt;p&gt;&quot;A LinearRing is closed LineString with 4 or more positions. The first and last positions are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a GeoJSON geometry type, it is referred to in the Polygon geometry type definition.&quot;&lt;/p&gt;

&lt;p&gt;Your first and last points have to be the same.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="77011">DOCS-1551</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="27385" name="ploygon.jpg" size="9883" author="prabath321" created="Thu, 30 May 2013 08:37:02 +0000"/>
                            <attachment id="27386" name="triangle.jpg" size="20066" author="prabath321" created="Thu, 30 May 2013 08:37:02 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 25 May 2013 00:43:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 37 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, 37 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>hari.khalsa@10gen.com</customfieldvalue>
            <customfieldvalue>prabath321</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrms6f:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>69802</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|hsjaev:</customfieldvalue>

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