Shapely 1.2.17

2013-01-27T19:24:42Z in the lab, python

I've tagged 1.2.7 and uploaded an sdist to PyPI. There's an important bug fix for Windows users in this one. Please heed the warning I've attached to the README, dear folks.

Warning

Windows users: do not under any circumstances use pip (or easy_install) to uninstall Shapely versions <= 1.2.16. Due to the way Shapely used to install its GEOS DLL and a distribute or setuptools bug, your Python installation may be broken by an uninstall command. Shapely 1.2.17 will uninstall safely.

The highlight of 1.2.17 is the module of affine transformation functions and utilities written by Mike Toews: shapely.affinity. The manual isn't up to date yet, but the module is itself very well documented. Here's a brief example of the rotate function, which calls the module's more general affine_transformation function.

# Default origin is the center of the geometry's bounding box.
# Default unit of angle is the decimal degree, positive is counter-clockwise.
# a) 90°, default origin
from shapely.affinity import rotate
rotated = rotate(line, 90.0)

# b) 90°, origin: (0, 0)
rotated = rotate(line, 90.0, origin=(0.0, 0.0))

In the figures below, the original line is shown in low alpha grey, the rotated line in blue, and the origin of rotation as a point.

http://farm9.staticflickr.com/8354/8420845442_c81ea589bf_o_d.png

I'm pleased to be able to say that 6 different programmers contributed to this release. I think this Shapely package just might catch on after all.

Update (2013-01-28): Windows binaries by Allan Adair: http://pypi.python.org/pypi/Shapely#downloads.

Comments are closed after 13 days.

about archive feed find

Some rights reserved by Sean Gillies.