Parameters
- features
- A set of features to rotate
- origin
- The origin around which the geometry will be rotated.
- angle
- The rotation angle in radians
// Rotates the selected features by a specified angle. await QueuedTask.Run(() => { var rotateFeatures = new EditOperation() { Name = "Rotate Features" }; //Rotate works on a selected set of features //Get all features that intersect a polygon //Rotate selected features 90 deg about "origin" rotateFeatures.Rotate(MapView.Active.GetFeatures(polygon), origin, angle); //Execute to execute the operation //Must be called within QueuedTask.Run if (!rotateFeatures.IsEmpty) { //Execute and ExecuteAsync will return true if the operation was successful and false if not var result = rotateFeatures.Execute(); //or use async flavor //await rotateFeatures.ExecuteAsync(); } });
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)