<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What returns geometry.getCentroid()? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181427#M16837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;My limited confirmation between arcpy and numpy calculations of centroid and area for multiple part/ring features suggest that the 'shoelace' (aka area weighted) method is used for area.&amp;nbsp; This is also used in the ArcGIS module.&amp;nbsp; The centroids do differ and don't seem to follow an area weighted method.&amp;nbsp; In python/numpy, the location of the rings relative to the outer ring seems to have no bearing, nor does the convexity/concavity of the shape.&amp;nbsp; It would be conjecture at this point to specify what actual approach is used to determine what is meant by 'centroid' in arc* parlance for moderately complex shapes.&amp;nbsp; Perhaps someone from the originating arcobjects definition team would weigh in.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;shapes can be seen here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2019/04/17/geometry-reconstructing-poly-features-4" target="_blank"&gt;/blogs/dan_patterson/2019/04/17/geometry-reconstructing-poly-features-4&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ---- polygons in a featureclass, with multiple parts and holes&lt;/SPAN&gt;

SR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; getSR&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
shapes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fc_shapes&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;p&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; p&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;area&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; p &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; shapes&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300005.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000005.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 100.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300005.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000011.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 78.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300019.70967741933&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000009.941935484&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 155.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300015.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000011.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 52.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300022.5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000006.2084&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 36.0)]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- s0 is an numpy array representation of arcpy polygons&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# compare&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s0&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroids&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; s0&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;areas&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4.26&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;13.77&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;19.46&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;9.82&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;14.08&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;15&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;5.3&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;78&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;155&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;52&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;36&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:16:17 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-11T09:16:17Z</dc:date>
    <item>
      <title>What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181418#M16828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this pice of code:&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;parcels.forEach(parcel &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; centroid &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; parcel.geometry.getCentroid(); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//getExtent().getCenter(); //getCentroid(); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; feature &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; Graphic(centroid, myUtils.NEW_ADDRESS_SYMBOL);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.map.graphics.add(feature);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I'm getting this result:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="441544" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/441544_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;The centroids are not in center of parcels, and some are outside their parcels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no point in publishing all code (I can do that on request), but changing this line:&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; centroid &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; parcel.geometry.getExtent().getCenter(); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//getCentroid(); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;for ilustrating the center of the extent of the parcel instead of the centroid give better results:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="441564" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/441564_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;Note that this is not a good solution:&lt;/P&gt;&lt;P&gt;I have added the extent for the last two parcels to show that the centre of the extent is not the desired solution, but this is a lot better solution that the getCentroid function the way I got it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2019 14:32:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181418#M16828</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2019-04-09T14:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181419#M16829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The coordinates are projected? If they are, and are in Web Mercator, it is not a very good projection to use for anything that requires spatial calculations (ie distance, area etc).&amp;nbsp; Your extent center seems appropriate for your examples, but may fail elsewhere.&amp;nbsp; Does your interface have labelPoint ? worth a try particularly for 'centers' that may fall outside of polygons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2019 17:55:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181419#M16829</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-04-09T17:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181420#M16830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get that the code was OK.&lt;/P&gt;&lt;P&gt;Now here is some data (one of the center of an extent):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="color: #212121; padding-left: 12px; list-style-type: circle;"&gt;&lt;LI class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;geometry&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;UL style="padding-left: 12px;"&gt;&lt;LI class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;spatialReference&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;UL style="padding-left: 12px; list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;latestWkid&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;3857&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;wkid&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;102100&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;__proto__&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Object&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;x&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;-8986538.660101335&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #881391;"&gt;y&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;5333501.101999095&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 18:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181420#M16830</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2019-04-11T18:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181421#M16831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;looks like web Mercator, hence my warning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 19:39:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181421#M16831</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-04-11T19:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181422#M16832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but what am I supposed to do? The map is not mine!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Apr 2019 13:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181422#M16832</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2019-04-12T13:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181423#M16833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’ve completed a short demo for the getCentroid issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may find the code at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Horiatu/Test_GetCentroid/"&gt;https://github.com/Horiatu/Test_GetCentroid/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and execute the application at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://horiatu.github.io/Test_GetCentroid/"&gt;https://horiatu.github.io/Test_GetCentroid/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may need credentials to see our layer service – let us know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When running the “get Centroid” button there is a 50/50 chance to get a(n almost) correct centroid, so, give it a chance: inspect more than one parcel…&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 15:54:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181423#M16833</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2019-04-15T15:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181424#M16834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We made the Parcel layer public.&lt;/P&gt;&lt;P&gt;You should be able to open it now without credentials.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2019 16:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181424#M16834</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2019-04-16T16:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181425#M16835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The docs claim that getCentroid finds the centroid of the largest ring in a multi-part polygon, however, i have observed that to not be the case. It seems to randomly pick one of the rings (maybe it's the first) and do the centroid of that. I had a county that was on the coast and so had some islands and it picked one of the tiny islands to do the centroid of.&amp;nbsp; I wonder if some of those parcels that are giving bad centroids are multi-part (or self intersecting) and have had their geometry fixed causing them to have tiny slivers you aren't seeing, but that are being chosen to do the centroid on.&amp;nbsp; I would get a hold of the source data and inspect the polygons that don't work and see where their vertices are.&amp;nbsp; I bet they have a sliver jutting out from them or something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2019 23:29:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181425#M16835</guid>
      <dc:creator>JoshOng</dc:creator>
      <dc:date>2019-05-16T23:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181426#M16836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case, I look only at polygons with a single ring, and I have observed the error there (as the returned point in not a centroid, sometimes being totaly out of a convex pologon.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in your case, I wonder what the largest ring is: is it the largest in surface, or in number of vertexes? In the second case, you may have an small island with more vertexes that the big land body...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2019 16:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181426#M16836</guid>
      <dc:creator>HoriaTudosie</dc:creator>
      <dc:date>2019-05-17T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181427#M16837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;My limited confirmation between arcpy and numpy calculations of centroid and area for multiple part/ring features suggest that the 'shoelace' (aka area weighted) method is used for area.&amp;nbsp; This is also used in the ArcGIS module.&amp;nbsp; The centroids do differ and don't seem to follow an area weighted method.&amp;nbsp; In python/numpy, the location of the rings relative to the outer ring seems to have no bearing, nor does the convexity/concavity of the shape.&amp;nbsp; It would be conjecture at this point to specify what actual approach is used to determine what is meant by 'centroid' in arc* parlance for moderately complex shapes.&amp;nbsp; Perhaps someone from the originating arcobjects definition team would weigh in.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;shapes can be seen here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2019/04/17/geometry-reconstructing-poly-features-4" target="_blank"&gt;/blogs/dan_patterson/2019/04/17/geometry-reconstructing-poly-features-4&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ---- polygons in a featureclass, with multiple parts and holes&lt;/SPAN&gt;

SR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; getSR&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
shapes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fc_shapes&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_fc0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;p&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; p&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;area&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; p &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; shapes&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300005.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000005.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 100.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300005.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000011.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 78.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300019.70967741933&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000009.941935484&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 155.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300015.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000011.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 52.0),&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Point &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;300022.5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5000006.2084&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#, #)&amp;gt;, 36.0)]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- s0 is an numpy array representation of arcpy polygons&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# compare&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s0&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroids&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; s0&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;areas&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4.26&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;13.77&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;19.46&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;9.82&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;14.08&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;15&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;5.3&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;100&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;78&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;155&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;52&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  &lt;SPAN class="number token"&gt;36&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:16:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181427#M16837</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T09:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181428#M16838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would argue it is clearly a defect with the JavaScript API, and unfortunately it still persists in the 4.x series.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at one of the "problem" parcels closer, ObjectID 12447, ArcGIS API for JavaScript gives a centroid of (-8986321.196204321, 5333925.59120203).&amp;nbsp; Calling the REST API for information on the parcel, a centroid is returned of (-8986332.9944987688, 5333932.5941599887).&amp;nbsp; Using the Esri JSON coordinates returned from the REST API and loading them into ArcGIS Pro, ArcPy returns a centroid of (-8986332.994498769, 5333932.5941599915).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2019 01:24:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181428#M16838</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-05-18T01:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: What returns geometry.getCentroid()?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181429#M16839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have experienced the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone on the forum told me that if i &lt;SPAN style="background-color: #ffffff; font-weight: inherit; text-decoration: none; font-size: 100%;"&gt;If I reverse the order of the vertices.&amp;nbsp; So make them counter clockwise for the ones that dont work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-weight: inherit; text-decoration: none; font-size: 100%;"&gt;This worked for me.&amp;nbsp; For what ever reason reversing the order on those that dont work works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-weight: inherit; text-decoration: none; font-size: 100%;"&gt;For my purposes I get the centroid then check the centroid is within the polygon if its not i reverse the order of the vertices and it goes bang in the middle.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-weight: inherit; text-decoration: none; font-size: 100%;"&gt;Weird.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 23:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-returns-geometry-getcentroid/m-p/181429#M16839</guid>
      <dc:creator>DavidDoyle</dc:creator>
      <dc:date>2019-11-06T23:28:01Z</dc:date>
    </item>
  </channel>
</rss>

