Affinity rotate changes angle in place
See original GitHub issueversion/platform
All from Anaconda main channel
- Shapely 1.6.4
- Geo’s 3.8.0
- Python 3.7 x64
- Windows 10 x64
Expected behavior and actual behavior.
When applying affinity rotate to line string with an angle in degrees, afterwards the variable containing angle has been permanently changed to radians.
If angle is already in radians, and use_radians=True
then works as expected
Steps to reproduce the problem.
from shapely import affinity
from shapely.geometry import LineString
L = 1.6
P = 5
tracker_theta = 129.7 # degrees
tracker1 = LineString([(-L/2, 0), (L/2, 0)])
tracker1rot = affinity.rotate(
tracker1, tracker_theta)
# tracker_theta has been permanently converted to radians
tracker2 = LineString([(P-L/2, 0), (P+L/2, 0)])
tracker2rot = affinity.rotate(
tracker2, tracker_theta)
# tracker2rot is incorrect because use_radians is false by default, but tracker theta had been converted in place unexpectedly
Operating system
(For example, Mac OS X 10.12.3)
Shapely version and provenance
(For example, 1.6b4 installed from PyPI using pip)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Snap to certain angle on rotate - Affinity | Forum
Is there a way to use certain angle to snap on rotate other than every 15 ... There is no way to change...
Read more >Rotate document view - affinity.help
-click in the Document View, then select Rotate Left or Rotate Right. The document view will be rotated in 15° increments. Alternatively, use...
Read more >Affinity rotate changes angle in place · Issue #793 - GitHub
When applying affinity rotate to line string with an angle in degrees, afterwards the variable containing angle has been permanently changed ...
Read more >Rotate, Zoom, Move your Canvas - Affinity Photo Tutorial
Learn to Zoom, Move and Rotate the Canvas in Affinity PhotoBuy me a Coffee: https://gumroad.com/l/coffeeforolivioMy Facebook group: ...
Read more >Affinity Photo Turn Off Rotate Document/Canvas - YouTube
I happen to rotate the Document in Affinity Photo and did not know how to get the regular view back. After some searching...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikofski thanks for coming back with the crucial detail. I hadn’t considered the array.
Ah, it happens when the variable is a numpy array.
try this: