<?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: Order intersections of a polyline by distance in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/order-intersections-of-a-polyline-by-distance/m-p/810573#M6436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this task by using toolboxes in a desktop environment, then wrap the process in an arcpy script. If you want it in a web environment you'll have to create a tool from your arcpy script and publish as a GP Tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workflow:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Run the intersection tool - make sure to select Points as output type. This will create points at the intersections.&lt;/P&gt;&lt;P&gt;2. Select L and copy to a temp layer. Select S1's intersection point.&lt;/P&gt;&lt;P&gt;3. Use the 'Split Line at Point' tool to split L (in the temp layer) at S1.&lt;/P&gt;&lt;P&gt;4. Now&amp;nbsp;L will be split in two. By using a search cursor you can get the shape length from the attribute table (if your data is in degrees create a new field and calculate geometry in projected units). Get the distance measure from the first part of the line - that will be the distance from start to intersection.&lt;/P&gt;&lt;P&gt;5. Repeat steps 2-4 with the different S intersection points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another workflow can be achieved with linear referencing:&lt;/P&gt;&lt;P&gt;1. Make your L a route with m-values.&lt;/P&gt;&lt;P&gt;2. Create the points as per step 1 in first workflow.&lt;/P&gt;&lt;P&gt;3. By using the 'Locate Features Along Route' tool get the m-value at the points' locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Uri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM style="font-size: 13px; "&gt;If this answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Oct 2020 01:55:52 GMT</pubDate>
    <dc:creator>UriGilad_EsriAu</dc:creator>
    <dc:date>2020-10-21T01:55:52Z</dc:date>
    <item>
      <title>Order intersections of a polyline by distance</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/order-intersections-of-a-polyline-by-distance/m-p/810572#M6435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given a polyline L and a set S of polylines that intersect L. I need to order S based on the distance of each element to the start o L.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For example:&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/511422_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using geometryEngine to find the intersections and calculated the distance of L to each intersection. However this won't work in some specific cases when L forms a curve. What I really needed is to calculate the distance along L to the intersection, but I couldn't find anything in the javascript API that did this.&lt;BR /&gt;&lt;BR /&gt;Is there a better way to accomplish this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2020 01:30:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/order-intersections-of-a-polyline-by-distance/m-p/810572#M6435</guid>
      <dc:creator>KevinTelles</dc:creator>
      <dc:date>2020-10-21T01:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Order intersections of a polyline by distance</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/order-intersections-of-a-polyline-by-distance/m-p/810573#M6436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this task by using toolboxes in a desktop environment, then wrap the process in an arcpy script. If you want it in a web environment you'll have to create a tool from your arcpy script and publish as a GP Tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workflow:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Run the intersection tool - make sure to select Points as output type. This will create points at the intersections.&lt;/P&gt;&lt;P&gt;2. Select L and copy to a temp layer. Select S1's intersection point.&lt;/P&gt;&lt;P&gt;3. Use the 'Split Line at Point' tool to split L (in the temp layer) at S1.&lt;/P&gt;&lt;P&gt;4. Now&amp;nbsp;L will be split in two. By using a search cursor you can get the shape length from the attribute table (if your data is in degrees create a new field and calculate geometry in projected units). Get the distance measure from the first part of the line - that will be the distance from start to intersection.&lt;/P&gt;&lt;P&gt;5. Repeat steps 2-4 with the different S intersection points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another workflow can be achieved with linear referencing:&lt;/P&gt;&lt;P&gt;1. Make your L a route with m-values.&lt;/P&gt;&lt;P&gt;2. Create the points as per step 1 in first workflow.&lt;/P&gt;&lt;P&gt;3. By using the 'Locate Features Along Route' tool get the m-value at the points' locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Uri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM style="font-size: 13px; "&gt;If this answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2020 01:55:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/order-intersections-of-a-polyline-by-distance/m-p/810573#M6436</guid>
      <dc:creator>UriGilad_EsriAu</dc:creator>
      <dc:date>2020-10-21T01:55:52Z</dc:date>
    </item>
  </channel>
</rss>

