<?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: AGSPolygon Border or Buffer in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agspolygon-border-or-buffer/m-p/70019#M678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/368037" target="_blank"&gt;Jai&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We just got this moved to the right place. Sorry we didn't see the question sooner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_geometry_engine.html#a078f684a870c2fb42508fd7d49d9bbc0" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;STRONG&gt;AGSGeometryEngine.offset()&lt;/STRONG&gt;&lt;/A&gt; method.‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; newPolygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; AGSGeometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;offsetGeometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;geom&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; distance&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;50&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                  offsetType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;squared&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                  bevelRatio&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                  flattenError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; AGSPolygon‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and got the following result (the cyan polygon was the original input):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="459794" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/459794_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the documentation to understand why the distance is -ve in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:41:14 GMT</pubDate>
    <dc:creator>Nicholas-Furness</dc:creator>
    <dc:date>2021-12-10T22:41:14Z</dc:date>
    <item>
      <title>AGSPolygon Border or Buffer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agspolygon-border-or-buffer/m-p/70018#M677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm developing an app in Swift where I need to draw an outline around a Polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I'm using the following API&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_geometry_engine.html#af776cf76190e456bebc501e13cfba37a"&gt;https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_geometry_engine.html#af776cf76190e456bebc501e13cfba37a&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ (nullable&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_polygon.html" style="color: #7a6045; font-weight: bold; text-decoration: none;"&gt;AGSPolygon&lt;/A&gt;*) &lt;SPAN&gt;geodeticBufferGeometry&lt;/SPAN&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_geometry.html" style="color: #7a6045; font-weight: bold; text-decoration: none;"&gt;AGSGeometry&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;*)&amp;nbsp;&lt;EM&gt;geometry&lt;/EM&gt;distance:(double)&amp;nbsp;&lt;EM&gt;distance&lt;/EM&gt;distanceUnit:(&lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_linear_unit.html" style="color: #7a6045; font-weight: bold; text-decoration: none;"&gt;AGSLinearUnit&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;*)&amp;nbsp;&lt;EM&gt;distanceUnit&lt;/EM&gt;maxDeviation:(double)&amp;nbsp;&lt;EM&gt;maxDeviation&lt;/EM&gt;curveType:(&lt;A href="https://developers.arcgis.com/ios/latest/api-reference/_a_g_s_enumerations_8h.html#a8d415455c1a3e871042349f6be3462e8" style="color: #7a6045; font-weight: bold; text-decoration: none;"&gt;AGSGeodeticCurveType&lt;/A&gt;)&amp;nbsp;&lt;EM&gt;curveType&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem for me is that it produces a buffer of constant distance around my original AGSGeometry (which in this case happens to be an AGSPolygon) rather than an outline. This manifests as an issue in the following situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Original polygon outlining an area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/451544_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. After running the geodeticBufferGeometry function to get a new AGSPolygon and drawing them I see the following:&lt;/P&gt;&lt;P&gt;Rounded corners on the edges of the shape where you have right-angles. Which is to be expected when calculating buffer points at a corner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/451546_pastedImage_7.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an API within the SDK I can call that would give me a border rather than a buffer as shown here :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/451547_pastedImage_11.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2019 15:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agspolygon-border-or-buffer/m-p/70018#M677</guid>
      <dc:creator>JaiByron</dc:creator>
      <dc:date>2019-06-26T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: AGSPolygon Border or Buffer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agspolygon-border-or-buffer/m-p/70019#M678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/368037" target="_blank"&gt;Jai&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We just got this moved to the right place. Sorry we didn't see the question sooner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_geometry_engine.html#a078f684a870c2fb42508fd7d49d9bbc0" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;STRONG&gt;AGSGeometryEngine.offset()&lt;/STRONG&gt;&lt;/A&gt; method.‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; newPolygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; AGSGeometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;offsetGeometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;geom&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; distance&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;50&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                  offsetType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;squared&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                  bevelRatio&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                  flattenError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; AGSPolygon‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and got the following result (the cyan polygon was the original input):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="459794" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/459794_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the documentation to understand why the distance is -ve in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:41:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agspolygon-border-or-buffer/m-p/70019#M678</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-10T22:41:14Z</dc:date>
    </item>
  </channel>
</rss>

