<?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 Rotating features in python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/rotating-features-in-python/m-p/444225#M34791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been using arcpy.mapping to set up a series of maps showing particular regions of an area. Most of the maps use rotated data frames to place each region on its individual sheet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Querying the data frames, I can get the 'corners' of the map extent from the extent object. I put corners in quotation marks because these 'corners' (lower and upper, left and right points) WOULD be the corners IF the data frame was not rotated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can get the rotation from the data frame object too, of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I was trying to create a proper bounding rectangle for each data frame, and while I can use the corner points to create a polygon geometry object, and create a feature class of the reconstituted rectangles, I also need to ROTATE the resulting rectangles to the rotation of the data frame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached a small graphic to show the issue. The red outlines show the actual extents of each data frame for one of the areas where I am working; the solid colored rectangles are the polygons generated when I make polygons from the 'corners' stored in the extent object. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously, I could rotate each extent interactively (and I did that to get the red outlines), but I would like to know how I can do this using python. I am guessing I would have to invoke some ArcObjects directly in the python script, but that is as far as I have come. Any actual incantation to summon the AO spirits has yet to be scripted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Advise? Am I correct in requiring AO? Hints?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;illustration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11990[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2012 14:58:26 GMT</pubDate>
    <dc:creator>markdenil</dc:creator>
    <dc:date>2012-02-15T14:58:26Z</dc:date>
    <item>
      <title>Rotating features in python</title>
      <link>https://community.esri.com/t5/python-questions/rotating-features-in-python/m-p/444225#M34791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been using arcpy.mapping to set up a series of maps showing particular regions of an area. Most of the maps use rotated data frames to place each region on its individual sheet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Querying the data frames, I can get the 'corners' of the map extent from the extent object. I put corners in quotation marks because these 'corners' (lower and upper, left and right points) WOULD be the corners IF the data frame was not rotated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can get the rotation from the data frame object too, of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I was trying to create a proper bounding rectangle for each data frame, and while I can use the corner points to create a polygon geometry object, and create a feature class of the reconstituted rectangles, I also need to ROTATE the resulting rectangles to the rotation of the data frame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached a small graphic to show the issue. The red outlines show the actual extents of each data frame for one of the areas where I am working; the solid colored rectangles are the polygons generated when I make polygons from the 'corners' stored in the extent object. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously, I could rotate each extent interactively (and I did that to get the red outlines), but I would like to know how I can do this using python. I am guessing I would have to invoke some ArcObjects directly in the python script, but that is as far as I have come. Any actual incantation to summon the AO spirits has yet to be scripted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Advise? Am I correct in requiring AO? Hints?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;illustration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11990[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 14:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rotating-features-in-python/m-p/444225#M34791</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-02-15T14:58:26Z</dc:date>
    </item>
  </channel>
</rss>

