<?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: Rotate Polygon using Attribute in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055600#M40687</link>
    <description>&lt;P&gt;Hi Anyry,&lt;/P&gt;&lt;P&gt;Here is the solution&lt;/P&gt;&lt;P&gt;Step 1: Polygon with Attribute Values. I have created a field name called "Angle" and manually keeping some values. (Refer Screenshot)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_0-1620386194137.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12810i8C69479855093418/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_0-1620386194137.png" alt="DrVSSKiran_0-1620386194137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 2: Go to the insert tab and click the new notebook&lt;/P&gt;&lt;P&gt;Step 3: Paste the script, which I have attached in mentioned in notepad and attached. (Refer Screenshot)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_1-1620386772715.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12811iA49D16E46434748F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_1-1620386772715.png" alt="DrVSSKiran_1-1620386772715.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 4: make changes in two placed feature class name and attribute field name. Refer screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_2-1620386912397.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12812iE46D85BC83082E66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_2-1620386912397.png" alt="DrVSSKiran_2-1620386912397.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 5: Hit the Run button in a notebook&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_3-1620387146114.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12813i70FE3105F17B59C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_3-1620387146114.png" alt="DrVSSKiran_3-1620387146114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 6: Here is the output results&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_4-1620387209425.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12814iBA0CE6544BBFF706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_4-1620387209425.png" alt="DrVSSKiran_4-1620387209425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Enjoy.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 11:36:25 GMT</pubDate>
    <dc:creator>DrVSSKiran</dc:creator>
    <dc:date>2021-05-07T11:36:25Z</dc:date>
    <item>
      <title>Rotate Polygon using Attribute</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055568#M40682</link>
      <description>&lt;P&gt;Good Morning&lt;/P&gt;&lt;P&gt;I am trying to rotate feature class with over 700 polygons based on the angle in an attribute? These polygons are all based on center points that were buffered and then run the create envelope tool. All the polygons now are oriented N/S. Any wok flows would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bruce Burwell&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 07:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055568#M40682</guid>
      <dc:creator>BruceBurwell1</dc:creator>
      <dc:date>2021-05-07T07:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate Polygon using Attribute</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055582#M40683</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try using arcpy, see the code below.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def rotation(rotatefield):
    def rotatepoint(point, pivotpoint, angle):
        angle_rad = -math.radians(angle)
        ox, oy = pivotpoint.X, pivotpoint.Y
        px, py = point.X, point.Y
        qx = ox + math.cos(angle_rad) * (px - ox) - math.sin(angle_rad) * (py - oy)
        qy = oy + math.sin(angle_rad) * (px - ox) + math.cos(angle_rad) * (py - oy)    
        return arcpy.Point(qx,qy)

    with arcpy.da.UpdateCursor("annotation_polygons",['SHAPE@', rotatefield]) as cursor:
        for row in cursor:
            polylist = []
            for part in row[0]:
                partlist = []
                for pnt in part:
                    if pnt is not None:
                        partlist.append(rotatepoint(pnt, arcpy.Point(row[0][0][0].X, row[0][0][0].Y), row[1])) 
                        polylist.append(partlist)
            row[0] = arcpy.Polygon(arcpy.Array(polylist))
            cursor.updateRow(row)&lt;/LI-CODE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 08:52:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055582#M40683</guid>
      <dc:creator>anyry</dc:creator>
      <dc:date>2021-05-07T08:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate Polygon using Attribute</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055600#M40687</link>
      <description>&lt;P&gt;Hi Anyry,&lt;/P&gt;&lt;P&gt;Here is the solution&lt;/P&gt;&lt;P&gt;Step 1: Polygon with Attribute Values. I have created a field name called "Angle" and manually keeping some values. (Refer Screenshot)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_0-1620386194137.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12810i8C69479855093418/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_0-1620386194137.png" alt="DrVSSKiran_0-1620386194137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 2: Go to the insert tab and click the new notebook&lt;/P&gt;&lt;P&gt;Step 3: Paste the script, which I have attached in mentioned in notepad and attached. (Refer Screenshot)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_1-1620386772715.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12811iA49D16E46434748F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_1-1620386772715.png" alt="DrVSSKiran_1-1620386772715.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 4: make changes in two placed feature class name and attribute field name. Refer screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_2-1620386912397.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12812iE46D85BC83082E66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_2-1620386912397.png" alt="DrVSSKiran_2-1620386912397.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 5: Hit the Run button in a notebook&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_3-1620387146114.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12813i70FE3105F17B59C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_3-1620387146114.png" alt="DrVSSKiran_3-1620387146114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Step 6: Here is the output results&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrVSSKiran_4-1620387209425.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12814iBA0CE6544BBFF706/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DrVSSKiran_4-1620387209425.png" alt="DrVSSKiran_4-1620387209425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Enjoy.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 11:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1055600#M40687</guid>
      <dc:creator>DrVSSKiran</dc:creator>
      <dc:date>2021-05-07T11:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate Polygon using Attribute</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1100318#M45819</link>
      <description>&lt;P&gt;This throws a NoneType is not iterable error.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 14:57:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1100318#M45819</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-09-21T14:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate Polygon using Attribute</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1572499#M91625</link>
      <description>&lt;P&gt;If you are going to share someone else's code verbatim, giving a reference and attribution will prevent others from thinking you are plagiarizing work.&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/309624/rotating-polygons-by-value-from-attribute-table-using-arcpy" target="_blank" rel="noopener"&gt;Rotating polygons by value from attribute table using ArcPy? - Geographic Information Systems Stack Exchange&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 17:44:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rotate-polygon-using-attribute/m-p/1572499#M91625</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2025-01-03T17:44:47Z</dc:date>
    </item>
  </channel>
</rss>

