<?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: Square and finish (create features with right angles) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529523#M71351</link>
    <description>&lt;P&gt;You'll have to build it yourself using the arcpy.Geometry functions. Or use numpy like &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt; to build the geometry in a more pure way then write that into the shape field of the feature.&lt;/P&gt;&lt;P&gt;Your general process would have to be:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Skip any polyline with only 2 points (endpoint perpendiculars are parallel)&lt;/LI&gt;&lt;LI&gt;Get the perpendicular lines at the endpoints of the polyline using the first and last segments&lt;/LI&gt;&lt;LI&gt;Normalize those perpendicular lines to a global coordinate system (cardinal)&lt;/LI&gt;&lt;LI&gt;Get the distance from the first and last points&lt;/LI&gt;&lt;LI&gt;Use those angles and the hypotenuse (distance from first to last point) to find the intersection point&lt;/LI&gt;&lt;LI&gt;Insert that point to the start and end of the line&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Thu, 29 Aug 2024 15:57:05 GMT</pubDate>
    <dc:creator>HaydenWelch</dc:creator>
    <dc:date>2024-08-29T15:57:05Z</dc:date>
    <item>
      <title>Square and finish (create features with right angles)</title>
      <link>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529347#M71348</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I will have a list of points as an input. I need to create a polyline using those points, like it is happening in Square and finish tool which will&amp;nbsp;&lt;SPAN&gt;close the shape and autocomplete the last two segments at right angles. Right now it is available on right click when creating features.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GISNewbieDev_0-1724935471077.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113833i56B46F4DE8A4F51E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GISNewbieDev_0-1724935471077.png" alt="GISNewbieDev_0-1724935471077.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the output of this operation. This operation will create 2 perpendicular lines from first and last point to close the polyline.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GISNewbieDev_1-1724935515076.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113834i19CAF6A28F6368CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GISNewbieDev_1-1724935515076.png" alt="GISNewbieDev_1-1724935515076.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I use this tool in arcpy?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875"&gt;@AlfredBaldenweck&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/607017"&gt;@HaydenWelch&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789"&gt;@BlakeTerhune&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 12:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529347#M71348</guid>
      <dc:creator>GISNewbieDev</dc:creator>
      <dc:date>2024-08-29T12:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Square and finish (create features with right angles)</title>
      <link>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529523#M71351</link>
      <description>&lt;P&gt;You'll have to build it yourself using the arcpy.Geometry functions. Or use numpy like &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt; to build the geometry in a more pure way then write that into the shape field of the feature.&lt;/P&gt;&lt;P&gt;Your general process would have to be:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Skip any polyline with only 2 points (endpoint perpendiculars are parallel)&lt;/LI&gt;&lt;LI&gt;Get the perpendicular lines at the endpoints of the polyline using the first and last segments&lt;/LI&gt;&lt;LI&gt;Normalize those perpendicular lines to a global coordinate system (cardinal)&lt;/LI&gt;&lt;LI&gt;Get the distance from the first and last points&lt;/LI&gt;&lt;LI&gt;Use those angles and the hypotenuse (distance from first to last point) to find the intersection point&lt;/LI&gt;&lt;LI&gt;Insert that point to the start and end of the line&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 29 Aug 2024 15:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529523#M71351</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-08-29T15:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Square and finish (create features with right angles)</title>
      <link>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529555#M71352</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/607017"&gt;@HaydenWelch&lt;/a&gt;&amp;nbsp;I am new to python can you guide me with some code snippets or examples or may be point me related to this around numpy?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 17:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1529555#M71352</guid>
      <dc:creator>GISNewbieDev</dc:creator>
      <dc:date>2024-08-29T17:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Square and finish (create features with right angles)</title>
      <link>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1531329#M72047</link>
      <description>&lt;P&gt;Can somebody guide me more on this?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875" target="_blank"&gt;@AlfredBaldenweck&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/607017" target="_blank"&gt;@HaydenWelch&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789" target="_blank"&gt;@BlakeTerhune&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527" target="_blank"&gt;@JakeSkinner&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600" target="_blank"&gt;@DanPatterson&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 07:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/square-and-finish-create-features-with-right/m-p/1531329#M72047</guid>
      <dc:creator>GISNewbieDev</dc:creator>
      <dc:date>2024-08-30T07:29:42Z</dc:date>
    </item>
  </channel>
</rss>

