<?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 Moving multiple structures at one time in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/moving-multiple-structures-at-one-time/m-p/1385139#M27171</link>
    <description>&lt;P&gt;I have a list of structures which need to be moved to specific Lat/Longs. Each Lat/Long is different. I wrote the code below to move all the structures to the lat/long which is stored in the attribute table. I am trying to use arcpy and the below python script to move the structures. currently the code below does move all the structures, but they are all moved to the lat/long of (0,0) instead of the lat/longs in the columns Lidar_Lat and Lidar_Long. How can I modify the code or other ways to mass move depending on lat/long.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Suggestions? Thanks.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
# Define the feature class and its coordinate system
feature_class = "ValleyNelsonTMT_New4"
coordinate_system = arcpy.Describe(feature_class).spatialReference
# Define the table containing the X and Y coordinates
table_with_coordinates = "ValleyNelsonTMT_New4"  
x_field = "Lidar_Long"  
y_field = "Lidar_Lat"
# Create a search cursor to read the X and Y coordinates from the table
with arcpy.da.SearchCursor(table_with_coordinates, [x_field, y_field]) as cursor:
    for row in cursor:
       x_field = row[0]
       y_field = row[1]
       # Create a new PointGeometry object with the coordinates
       new_point = arcpy.Point(x_field,y_field)
       new_geometry = arcpy.PointGeometry(new_point, coordinate_system)
        # Update the geometry of the structure
       with arcpy.da.UpdateCursor(feature_class, ["SHAPE@"], spatial_reference=coordinate_system) as update_cursor:
            for update_row in update_cursor:
                update_row[0] = new_geometry
                update_cursor.updateRow(update_row)
print("Done")&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 21 Feb 2024 21:11:35 GMT</pubDate>
    <dc:creator>AliKhaja</dc:creator>
    <dc:date>2024-02-21T21:11:35Z</dc:date>
    <item>
      <title>Moving multiple structures at one time</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/moving-multiple-structures-at-one-time/m-p/1385139#M27171</link>
      <description>&lt;P&gt;I have a list of structures which need to be moved to specific Lat/Longs. Each Lat/Long is different. I wrote the code below to move all the structures to the lat/long which is stored in the attribute table. I am trying to use arcpy and the below python script to move the structures. currently the code below does move all the structures, but they are all moved to the lat/long of (0,0) instead of the lat/longs in the columns Lidar_Lat and Lidar_Long. How can I modify the code or other ways to mass move depending on lat/long.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Suggestions? Thanks.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
# Define the feature class and its coordinate system
feature_class = "ValleyNelsonTMT_New4"
coordinate_system = arcpy.Describe(feature_class).spatialReference
# Define the table containing the X and Y coordinates
table_with_coordinates = "ValleyNelsonTMT_New4"  
x_field = "Lidar_Long"  
y_field = "Lidar_Lat"
# Create a search cursor to read the X and Y coordinates from the table
with arcpy.da.SearchCursor(table_with_coordinates, [x_field, y_field]) as cursor:
    for row in cursor:
       x_field = row[0]
       y_field = row[1]
       # Create a new PointGeometry object with the coordinates
       new_point = arcpy.Point(x_field,y_field)
       new_geometry = arcpy.PointGeometry(new_point, coordinate_system)
        # Update the geometry of the structure
       with arcpy.da.UpdateCursor(feature_class, ["SHAPE@"], spatial_reference=coordinate_system) as update_cursor:
            for update_row in update_cursor:
                update_row[0] = new_geometry
                update_cursor.updateRow(update_row)
print("Done")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Feb 2024 21:11:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/moving-multiple-structures-at-one-time/m-p/1385139#M27171</guid>
      <dc:creator>AliKhaja</dc:creator>
      <dc:date>2024-02-21T21:11:35Z</dc:date>
    </item>
  </channel>
</rss>

