<?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 Best way to merge many lines into one calculated line using ArcPy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/best-way-to-merge-many-lines-into-one-calculated/m-p/751012#M58014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on an ETL process to pull data from one data source (a web API, provided by a generic data service)&amp;nbsp;and entering it into a SQL Server database used by a client with ArcMap. I'm also semi-new to ArcGIS, so some of this is over my head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The features I'm importing are all user-collected, and are usually collected by multiple people at multiple different times, which leads to a lack of uniformity in the geospatial information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far everything is great, but here's where I start getting lost. Some feature layers contain&amp;nbsp;lines that are composites of the lines in another feature layer. People collect coordinates as they hike part of a route, and upload their hike and which route they were hiking. I have a feature layer&amp;nbsp; called SubRoute,&amp;nbsp;who's features represent&amp;nbsp;each hiking path, and a feature layer called Route that will contain features representing the path of an entire hiking route. I want to use SubRoutes to calculate the entire Route path by combining everyone's individual hike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During development, I was provided with test data which was all nearly ideal (and ordered). No two SubRoutes overlapped, and each began near where the last one ended. I was able to simply append each line together to get one perfect line.&amp;nbsp; The test data looked similar to Graph A in the attached image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, Im looking at the real-world data and it looks more like Graph B, with the potential to look like Graph C or worse. Obviously, my previous approach won't work at all. Now I'm kind of stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I take a group of lines, and create one composite line to represent the "average" (for lack of better words) of all of the lines? The blue line in Graphs A and B is what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Examples A, B, and C" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/454286_plotexamples.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonus problem: After I find the composite line, I would like the take all the individual lines and change them to overlay the new composite line. I'm assuming the Snap tool is best for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time, I really appreciate any advice or suggestions!&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jul 2019 22:22:19 GMT</pubDate>
    <dc:creator>JerryMullerman</dc:creator>
    <dc:date>2019-07-24T22:22:19Z</dc:date>
    <item>
      <title>Best way to merge many lines into one calculated line using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/best-way-to-merge-many-lines-into-one-calculated/m-p/751012#M58014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on an ETL process to pull data from one data source (a web API, provided by a generic data service)&amp;nbsp;and entering it into a SQL Server database used by a client with ArcMap. I'm also semi-new to ArcGIS, so some of this is over my head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The features I'm importing are all user-collected, and are usually collected by multiple people at multiple different times, which leads to a lack of uniformity in the geospatial information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far everything is great, but here's where I start getting lost. Some feature layers contain&amp;nbsp;lines that are composites of the lines in another feature layer. People collect coordinates as they hike part of a route, and upload their hike and which route they were hiking. I have a feature layer&amp;nbsp; called SubRoute,&amp;nbsp;who's features represent&amp;nbsp;each hiking path, and a feature layer called Route that will contain features representing the path of an entire hiking route. I want to use SubRoutes to calculate the entire Route path by combining everyone's individual hike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During development, I was provided with test data which was all nearly ideal (and ordered). No two SubRoutes overlapped, and each began near where the last one ended. I was able to simply append each line together to get one perfect line.&amp;nbsp; The test data looked similar to Graph A in the attached image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, Im looking at the real-world data and it looks more like Graph B, with the potential to look like Graph C or worse. Obviously, my previous approach won't work at all. Now I'm kind of stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I take a group of lines, and create one composite line to represent the "average" (for lack of better words) of all of the lines? The blue line in Graphs A and B is what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Examples A, B, and C" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/454286_plotexamples.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonus problem: After I find the composite line, I would like the take all the individual lines and change them to overlay the new composite line. I'm assuming the Snap tool is best for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time, I really appreciate any advice or suggestions!&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 22:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/best-way-to-merge-many-lines-into-one-calculated/m-p/751012#M58014</guid>
      <dc:creator>JerryMullerman</dc:creator>
      <dc:date>2019-07-24T22:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to merge many lines into one calculated line using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/best-way-to-merge-many-lines-into-one-calculated/m-p/751013#M58015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;buffer your polylines by a finite amount to collapse the inter-line space&lt;/P&gt;&lt;P&gt;convert the buffer to a centerline&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/topographic-production/polygon-to-centerline.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/topographic-production/polygon-to-centerline.htm"&gt;Polygon To Centerline—Topographic Production toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good first start&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 23:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/best-way-to-merge-many-lines-into-one-calculated/m-p/751013#M58015</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-07-24T23:47:29Z</dc:date>
    </item>
  </channel>
</rss>

