Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (4)
New upstream version 2.2.2
· 4bea7a4c
Bas Couwenberg
authored
Dec 21, 2018
4bea7a4c
Merge tag 'upstream/2.2.2'
· bbd1724a
Bas Couwenberg
authored
Dec 21, 2018
Upstream version 2.2.2
bbd1724a
New upstream release.
· b6f13fbb
Bas Couwenberg
authored
Dec 21, 2018
b6f13fbb
Set distribution to unstable.
· fe0b922d
Bas Couwenberg
authored
Dec 21, 2018
fe0b922d
Show whitespace changes
Inline
Side-by-side
AUTHORS.txt
View file @
fe0b922d
...
...
@@ -7,3 +7,4 @@ Authors
- Kevin Wurster <wursterk@gmail.com>
- Todd Small <todd_small@icloud.com>
- Juan Luis Cano Rodríguez <juanlu@satellogic.com>
- Kirill Kouzoubov
CHANGES.txt
View file @
fe0b922d
CHANGES
=======
2.2.2 (2018-12-20)
------------------
- Affine.itransform computed the wrong results for arrays with rotation or
shear (#40). This is fixed (#41).
2.2.1 (2018-06-04)
------------------
- Docstring improvements (#37).
...
...
README.rst
View file @
fe0b922d
...
...
@@ -44,8 +44,8 @@ Matrices can be created by passing the values ``a, b, c, d, e, f`` to the
Affine(1.0, 0.9999999999999999, 0.0,
0.9999999999999999, 1.0, 0.0)
>>> Affine.rotation(45.0) # decimal degrees
Affine(0.7071067811865476, 0.7071067811865475, 0.0,
-
0.7071067811865475, 0.7071067811865476, 0.0)
Affine(0.7071067811865476,
-
0.7071067811865475, 0.0,
0.7071067811865475, 0.7071067811865476, 0.0)
These matrices can be applied to ``(x, y)`` tuples to obtain transformed
coordinates ``(x', y')``.
...
...
@@ -62,8 +62,8 @@ They may also be multiplied together to combine transformations.
.. code-block:: pycon
>>> Affine.translation(1.0, 5.0) * Affine.rotation(45.0)
Affine(0.7071067811865476, 0.7071067811865475, 1.0,
-
0.7071067811865475, 0.7071067811865476, 5.0)
Affine(0.7071067811865476,
-
0.7071067811865475, 1.0,
0.7071067811865475, 0.7071067811865476, 5.0)
Usage with GIS data packages
----------------------------
...
...
affine/__init__.py
View file @
fe0b922d
...
...
@@ -47,7 +47,7 @@ import math
__all__
=
[
'
Affine
'
]
__author__
=
"
Sean Gillies
"
__version__
=
"
2.2.
1
"
__version__
=
"
2.2.
2
"
EPSILON
=
1e-5
...
...
@@ -516,7 +516,7 @@ class Affine(
if
self
is
not
identity
and
self
!=
identity
:
sa
,
sb
,
sc
,
sd
,
se
,
sf
,
_
,
_
,
_
=
self
for
i
,
(
x
,
y
)
in
enumerate
(
seq
):
seq
[
i
]
=
(
x
*
sa
+
y
*
s
d
+
sc
,
x
*
s
b
+
y
*
se
+
sf
)
seq
[
i
]
=
(
x
*
sa
+
y
*
s
b
+
sc
,
x
*
s
d
+
y
*
se
+
sf
)
def
__invert__
(
self
):
"""
Return the inverse transform.
...
...
affine/tests/test_transform.py
View file @
fe0b922d
...
...
@@ -388,6 +388,13 @@ class PyAffineTestCase(unittest.TestCase):
assert
r
is
None
,
r
assert
pts
==
[(
-
8
,
-
2
),
(
2
,
0
),
(
-
6
,
-
4
)]
A
=
Affine
.
rotation
(
33
)
pts
=
[(
4
,
1
),
(
-
1
,
0
),
(
3
,
2
)]
pts_expect
=
[
A
*
pt
for
pt
in
pts
]
r
=
A
.
itransform
(
pts
)
assert
r
is
None
assert
pts
==
pts_expect
def
test_mul_wrong_type
(
self
):
with
pytest
.
raises
(
TypeError
):
Affine
(
1
,
2
,
3
,
4
,
5
,
6
)
*
None
...
...
debian/changelog
View file @
fe0b922d
python-affine (2.2.
1-2) UNRELEASED
; urgency=medium
python-affine (2.2.
2-1) unstable
; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.2.1, no changes.
* Drop autopkgtests to test installability & module import.
* Add lintian override for testsuite-autopkgtest-missing.
* Update watch file to limit matches to archive path.
-- Bas Couwenberg <sebastic@debian.org>
Thu, 05 Jul
2018
11
:0
4
:2
6
+0
2
00
-- Bas Couwenberg <sebastic@debian.org>
Fri, 21 Dec
2018
07
:0
9
:2
4
+0
1
00
python-affine (2.2.1-1) unstable; urgency=medium
...
...