<?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: Creating points on a line in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78069#M6276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could build the route event table by first building a dictionary of a list of event measures keyed to the route ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;format your existing list of irregular steps thusly:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;eventDict = {
rt1: [10, 20, 30, 40],
rt2: [5, 7, 9],
rt3: [9, 99, 999]
}&lt;/PRE&gt;&lt;SPAN&gt;Then use the dictionary to populate the event table (with an insert cursor) setting each event so&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the route ID is set from the key and the measure set from each member of the list&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;route&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; measure
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40
rt2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5
rt2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7
and so on...&lt;/PRE&gt;&lt;SPAN&gt;Then apply the events to the routes, and convert to points.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:00:25 GMT</pubDate>
    <dc:creator>markdenil</dc:creator>
    <dc:date>2021-12-10T23:00:25Z</dc:date>
    <item>
      <title>Creating points on a line</title>
      <link>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78067#M6274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to create a series of points on a polyline.&amp;nbsp; My polyline has a start and end point and I have distances for points along that line that I need to plot.&amp;nbsp; My polyline is 250 m long and I have points with distances from 0-250m on the polyline.&amp;nbsp; The distances of the points are uneven from the start of the polyline.&amp;nbsp; Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 15:49:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78067#M6274</guid>
      <dc:creator>CharlotteBerry</dc:creator>
      <dc:date>2013-06-24T15:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating points on a line</title>
      <link>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78068#M6275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I need to create a series of points on a polyline.&amp;nbsp; My polyline has a start and end point and I have distances for points along that line that I need to plot.&amp;nbsp; My polyline is 250 m long and I have points with distances from 0-250m on the polyline.&amp;nbsp; The distances of the points are uneven from the start of the polyline.&amp;nbsp; Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the point locates all have to be inputted manually anyway, because they do not follow a standard pattern, then linear referencing seems the way to go.&amp;nbsp; Use the Create Route tool on your line to assign measures based on your line length.&amp;nbsp; Then create a table that contains one field for the line ID value (repeated for every record associated with that line) and a second double field for each measure location.&amp;nbsp; Right click the table and make it an Route Event Table.&amp;nbsp; If all the records were already entered they will plot on the line.&amp;nbsp; You could watch new records plot on the line as soon as both the Line ID and measure value are posted for e new record.&amp;nbsp; To insert a new location, just insert a new record with a Line ID and measure.&amp;nbsp; If the position data is in Excel, the spreadsheet may work directly as an Event table already as long as you add a column for the Line ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it followed a simple pattern other methods would be more efficient, like repeating the split tool or some Python scripts.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 16:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78068#M6275</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-06-24T16:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating points on a line</title>
      <link>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78069#M6276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could build the route event table by first building a dictionary of a list of event measures keyed to the route ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;format your existing list of irregular steps thusly:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;eventDict = {
rt1: [10, 20, 30, 40],
rt2: [5, 7, 9],
rt3: [9, 99, 999]
}&lt;/PRE&gt;&lt;SPAN&gt;Then use the dictionary to populate the event table (with an insert cursor) setting each event so&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the route ID is set from the key and the measure set from each member of the list&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;route&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; measure
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30
rt1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40
rt2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5
rt2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7
and so on...&lt;/PRE&gt;&lt;SPAN&gt;Then apply the events to the routes, and convert to points.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:00:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78069#M6276</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2021-12-10T23:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating points on a line</title>
      <link>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78070#M6277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I need to create a series of points on a polyline.&amp;nbsp; My polyline has a start and end point and I have distances for points along that line that I need to plot.&amp;nbsp; My polyline is 250 m long and I have points with distances from 0-250m on the polyline.&amp;nbsp; The distances of the points are uneven from the start of the polyline.&amp;nbsp; Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, if it is along a single line with only two points, you could use the start point as your begining, then use Cosine to calculate the Oposite and Adjacent distances using your angle and length.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(startX + Adjacent), (startY + Opposite) would be the "new" point at your distance along the line.&amp;nbsp; Then, the only thing that changes is the distance, so just iterate it using same math, but with different length.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could also create lines starting at start point in dist/direction, then get end verticies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This, of course is assuming you are after code.&amp;nbsp; In ArcMap, just start editing and add points (using Point at end of line Tool) with snapping on.&amp;nbsp; Snapping will start at the endpoint of your line, then right-click and select "Lenth", enter your lenth and it will "fix" it, then move until you snap back to the line and finish sketch.&amp;nbsp; Do this for each of your points and you are done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also in ArcMap, if your line has M values, can use construct points tool &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001t00000029000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001t00000029000000.htm&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 17:46:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-points-on-a-line/m-p/78070#M6277</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-06-25T17:46:01Z</dc:date>
    </item>
  </channel>
</rss>

