I'm currently using geopandas to iterate through individual features in ArcGIS Pro and rotate them. It would be great if a method was added to arcpy where features could be rotated easily by specifying an angle, and a pivot point as a coordinate pair/tuple/point features. Something like:
arcpy.edit.Rotate(in_features, angle, origin, radians)
Example:
import arcpy
arcpy.env.workspace = "C:/data"
arcpy.MakeFeatureLayer_management("platforms.shp", "platforms_lyr", whereclause="WTG_ID = 'AB01'")
arcpy.edit.Rotate("platforms_lyr", 30, (123456.1, 5465646.10), radians=False)
# Else, use list comp and search cursors to grab the angles and coordinates of each row in the attributes.
With cursors, the angle and origin coordinates could be derived from a field in the in_features or hard coded etc.
In the Arcpro 3.3 release they added to geometry objects scale and move, so lets hope they add rotate to a geometries list of methods.
We're working on this! This status does not guarantee that the functionality will be in the next release, but development work has begun. Release cycles vary by product so make sure to check the product life cycle information to get an idea of when to expect the next release.
This idea has been implemented in ArcGIS Pro 3.4, please see the Python section of the What's New in ArcGIS Pro 3.4 topic and scroll to ArcPy.
See Geometry—ArcGIS Pro | Documentation for additional details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.