<?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: Buffer on one side of feature only possible? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/1324588#M82131</link>
    <description>&lt;P&gt;ArcGIS Pro Buffer Tool&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DorianneDysart_0-1693518643800.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79616i710A20AD0C98EB73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DorianneDysart_0-1693518643800.png" alt="DorianneDysart_0-1693518643800.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;have to have a special license to only buffer one side &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 21:52:11 GMT</pubDate>
    <dc:creator>DorianneDysart</dc:creator>
    <dc:date>2023-08-31T21:52:11Z</dc:date>
    <item>
      <title>Buffer on one side of feature only possible?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/618079#M57760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear Readers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i had followed the examples&amp;nbsp;to call geometry services buffer function and to add the resulting graphic to the map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/util_buffergraphic.html"&gt;https://developers.arcgis.com/javascript/3/jssamples/util_buffergraphic.html&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/bufferparameters-amd.html"&gt;https://developers.arcgis.com/javascript/3/jsapi/bufferparameters-amd.html&lt;/A&gt;. it worked fine/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our ArcMap users are used to having an ArcObjects function that specifically lets the users choose&amp;nbsp;as to which side of the feature the buffer area needs to be drawn. &amp;nbsp;for example, for a line feature, the user will have the option to choose whether the buffer should be on:&lt;/P&gt;&lt;P&gt;1. left side of the line,&lt;/P&gt;&lt;P&gt;2. right side of the line, or&lt;/P&gt;&lt;P&gt;3. both sides of the line (default).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, a polygon buffer would let the users choose between 1. include polygon area while computing the buffer or 2. exclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there &amp;nbsp;sample code or any suggestions in this regard? &amp;nbsp;Any help would be appreciated/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 22:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/618079#M57760</guid>
      <dc:creator>Ravichandran_M_Kaushika</dc:creator>
      <dc:date>2017-04-13T22:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer on one side of feature only possible?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/618080#M57761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt; I would assume that you were using the out-of-the-box Buffer (Analysis) tool within ArcObjects to create the one-side buffer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;&lt;EM&gt;&lt;STRONG&gt;Buffer (Analysis)&lt;BR clear="none" /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Farcmap%2Flatest%2Ftools%2Fanalysis-toolbox%2Fbuffer.htm" rel="nofollow" target="_blank"&gt;http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/buffer.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;In the above documentation for the tool you'll see that it &lt;/SPAN&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;&lt;EM&gt;&lt;STRONG&gt;line side&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;parameter allows you to specify the side of the feature that will be buffered. Within the JS API there is no functionality available to the client that would allow this out-of-the-box. The suggested workflow to implement this would be to do one of the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;1. Publish the Buffer (Analysis) tool as a Geoprocessing Service. You could then supply your features to this service along with the buffer side and the out-of-the-box GP tool would handle returning you the results you're seeking.&lt;/SPAN&gt;&lt;BR clear="none" style="color: #16325c; background-color: #ffffff; font-size: 12px;" /&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;2. Implement logic in the JS API to cut the buffer returned by the client (i.e. when using GeometryEngine to buffer) or a service, such as using GeometryService to buffer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;In regards to the second suggestion, we do not have an example of this and I cannot write one for you, but I can provide you with enough logic to implement this on your end. For example, let's say that you were buffering a straight line as shown below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;&lt;EM&gt;&lt;STRONG&gt;geometryEngine buffer Method&lt;BR clear="none" /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2F3%2Fjsapi%2Fesri.geometry.geometryengine-amd.html%23buffer" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html#buffer&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="346678" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346678_buffer1.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;To get top half of this buffer I would start by first creating a line that bisects the buffer polygon. This could done in several ways depending on the API. In a simple case like shown above I could either move the x coordinate of the vertices or I could leverage the envelope of the geometry and extend the lines to them as shown below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;&lt;EM&gt;&lt;STRONG&gt;Polygon getExtent Method&lt;BR clear="none" /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2F3%2Fjsapi%2Fpolygon-amd.html%23getextent" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#getextent&lt;/A&gt;&lt;BR clear="none" /&gt;&lt;BR clear="none" /&gt;geometryEngine nearestCoordinate Method&lt;BR clear="none" /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2F3%2Fjsapi%2Fesri.geometry.geometryengine-amd.html%23nearestcoordinate" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html#nearestcoordinate&lt;/A&gt;&lt;BR clear="none" /&gt;&lt;BR clear="none" /&gt;Polyline insertPoint Method&lt;BR clear="none" /&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2F3%2Fjsapi%2Fpolyline-amd.html%23insertpoint" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jsapi/polyline-amd.html#insertpoint&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346682_buffer2.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;Now that I have a line that bisects the polygon I could use the cut method of the geometryEngine to cut the polygon into left and right halves. I would then need to decide on which halve to persist and whether I want to replace the existing geometry or insert the data as a new record into my GraphicsLayer or FeatureLayer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346683_buffer3.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px;"&gt;Now as I stated before, I cannot implement the code for the second suggestion above. It would be your responsibility to handle the logic for this task. You'll also want to note that the workflow I describe was intended for situations where the line is straight in a cardinal direction. This will not be the case with most real world data and you will find situations where the lines are curved or at angles. You'll need to ensure that you logic takes these situations into account when creating the line to cut the polygon. I'll leave you with the last set of examples. After reviewing my suggested workflow thing about how you'd handle the following programmatically to determine the top and bottom halves of the polygon.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-4 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346684_buffer4.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-5 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346685_buffer5.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-6 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346686_buffer6.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-7 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/346687_buffer7.png" style="width: 620px; height: 575px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 18:08:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/618080#M57761</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2017-04-14T18:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer on one side of feature only possible?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/618081#M57762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Freddie for taking the time to write up the answer for everyone's benefit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have a nice weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravi Kaushika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 18:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/618081#M57762</guid>
      <dc:creator>Ravichandran_M_Kaushika</dc:creator>
      <dc:date>2017-04-14T18:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer on one side of feature only possible?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/1324588#M82131</link>
      <description>&lt;P&gt;ArcGIS Pro Buffer Tool&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DorianneDysart_0-1693518643800.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79616i710A20AD0C98EB73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DorianneDysart_0-1693518643800.png" alt="DorianneDysart_0-1693518643800.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;have to have a special license to only buffer one side &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 21:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/1324588#M82131</guid>
      <dc:creator>DorianneDysart</dc:creator>
      <dc:date>2023-08-31T21:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Buffer on one side of feature only possible?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/1477835#M84703</link>
      <description>&lt;P&gt;Hi, Have you found any way to do this.?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 17:13:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/buffer-on-one-side-of-feature-only-possible/m-p/1477835#M84703</guid>
      <dc:creator>MohammedHilal_K</dc:creator>
      <dc:date>2024-05-23T17:13:01Z</dc:date>
    </item>
  </channel>
</rss>

