Error when translate a point
See original GitHub issueExpected behavior and actual behavior.
Something in the last release (1.8.3) seems to cause an error when translate a point. Working fine with polygons.
Steps to reproduce the problem.
from shapely.geometry import Point
from shapely import affinity
affinity.translate(Point(10, 10), 50, 50)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/t/venv/lib/python3.8/site-packages/shapely/affinity.py", line 264, in translate
return affine_transform(geom, matrix)
File "/tmp/t/venv/lib/python3.8/site-packages/shapely/speedups/__init__.py", line 73, in affine_transform
return _speedups.affine_transform(geom, matrix)
File "shapely/speedups/_speedups.pyx", line 521, in shapely.speedups._speedups.affine_transform
File "shapely/speedups/_speedups.pyx", line 553, in shapely.speedups._speedups.affine_transform
TypeError: an integer is required
Env
Ubuntu 20.04 Shapely version: 1.8.3
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Translating Points - YouTube
Translating Points. 3.3K views 9 years ago Algebra II · Keith Mann. Keith Mann. 1.02K subscribers. Subscribe. Like. I like this.
Read more >Example translating points - YouTube
Khan Academy's mission is to provide a free, world-class education for anyone, anywhere. Our platform offers free high-quality, standards- ...
Read more >How to Move (Translate) a Point on a Graph Math Help
VIEW ENTIRE PLAYLIST: http://www.youtube.com/view_play_list?p=0D2E061A2AF3327C If this helps, please leave a comment and subscribe!
Read more >Translations 4.1 - Big Ideas Math
The point (x, y) is translated a units horizontally and b units vertically. Write a rule ... ERROR ANALYSIS Describe and correct the...
Read more >Explanation of Error Categories
A grammar error occurs when a sentence in the translation violates the grammatical rules of the target language. Grammar errors include lack of...
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
So the underlying reason here is that
_geom
/__geom__
no longer is an int:We are seeing similar problems in geopandas (with conversion to pygeos): https://github.com/geopandas/geopandas/issues/2531. So ideally we would solve this by changing
__geom__
back to an int, and not by updating our internal code to deal with the changed return value.Resolved by #1487. @johnnv1 @jorisvandenbossche new distributions are uploading to PyPI now.