<?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: I have 70 points which need additional points added at 25 and 50m N, S, E, W in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1155610#M43919</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp; this was a brilliant solution. It took me a few times to play with it to get the fields right, but in the end it worked and your solution really impressed my team. A few made comments they wouldn't have thought of doing it that way, Very much appreciated. Apologies for taking a week to respond.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2022 09:03:01 GMT</pubDate>
    <dc:creator>across_the_pond</dc:creator>
    <dc:date>2022-03-21T09:03:01Z</dc:date>
    <item>
      <title>I have 70 points which need additional points added at 25 and 50m N, S, E, W</title>
      <link>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1153740#M43910</link>
      <description>&lt;P&gt;Hello - this is a new task for me so please answer as if I'm in primary school. Shapefile contains 70 points which each need a point added at 25 and 50 m in each direction. What is the easiest way to do/automate this? So far I have only added x, y fields.&amp;nbsp; Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Name.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36367i0F115EFA2A6F5579/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Name.PNG" alt="Name.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 11:10:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1153740#M43910</guid>
      <dc:creator>across_the_pond</dc:creator>
      <dc:date>2022-03-15T11:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: I have 70 points which need additional points added at 25 and 50m N, S, E, W</title>
      <link>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1153754#M43911</link>
      <description>&lt;P&gt;Easiest way is probably to use Python:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open the Python window&lt;/LI&gt;&lt;LI&gt;Copy and paste the script below&lt;/LI&gt;&lt;LI&gt;Modify the &lt;STRONG&gt;layer&lt;/STRONG&gt; and &lt;STRONG&gt;fields&lt;/STRONG&gt; variables&lt;/LI&gt;&lt;LI&gt;Run&lt;/LI&gt;&lt;LI&gt;You may have to refresh the map to see the changes&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="python"&gt;# Name of the layer (if loaded in map) or path to the feature class / shape file
layer = "test"
# fields that are copied. First one has to be SHAPE@
fields = ["SHAPE@", "TextField"]


# read the original points
original_points = [row for row in arcpy.da.SearchCursor(layer, fields)]

with arcpy.da.InsertCursor(layer, fields) as cursor:
    for point in original_points:
        # create the 8 new coordinate pairs
        coords = point[0].firstPoint
        new_coords = [
            [coords.X - 25, coords.Y],
            [coords.X - 50, coords.Y],
            [coords.X + 25, coords.Y],
            [coords.X + 50, coords.Y],
            [coords.X, coords.Y - 25],
            [coords.X, coords.Y - 50],
            [coords.X, coords.Y + 25],
            [coords.X, coords.Y + 50],
        ]
        
        for nc in new_coords:
            # create a copy of the original point's attributes
            new_point = list(point)
            # change the copy's geometry
            new_point[0] = arcpy.PointGeometry(arcpy.Point(nc[0], nc[1]))
            # write copied point to shape file
            cursor.insertRow(new_point)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1647345552830.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36369i4BEBBBEA888DABC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1647345552830.png" alt="JohannesLindner_0-1647345552830.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After (note that I only specified "TextField" to be copied)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1647345614848.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36370iAB0AE7C7D34642F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1647345614848.png" alt="JohannesLindner_1-1647345614848.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 12:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1153754#M43911</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-15T12:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: I have 70 points which need additional points added at 25 and 50m N, S, E, W</title>
      <link>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1153768#M43912</link>
      <description>&lt;P&gt;Thank you Johannes, I will try this.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 13:10:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1153768#M43912</guid>
      <dc:creator>across_the_pond</dc:creator>
      <dc:date>2022-03-15T13:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: I have 70 points which need additional points added at 25 and 50m N, S, E, W</title>
      <link>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1155610#M43919</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp; this was a brilliant solution. It took me a few times to play with it to get the fields right, but in the end it worked and your solution really impressed my team. A few made comments they wouldn't have thought of doing it that way, Very much appreciated. Apologies for taking a week to respond.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 09:03:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/i-have-70-points-which-need-additional-points/m-p/1155610#M43919</guid>
      <dc:creator>across_the_pond</dc:creator>
      <dc:date>2022-03-21T09:03:01Z</dc:date>
    </item>
  </channel>
</rss>

