Fix polygon approximation for 0 or less tolerance

This commit is contained in:
Johannes Schönberger
2012-10-13 23:28:29 -07:00
committed by Stefan van der Walt
parent e428285aa5
commit 96799d4795
+1 -1
View File
@@ -28,7 +28,7 @@ def approximate_polygon(coords, tolerance):
----------
.. [1] http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
"""
if tolerance == 0:
if tolerance <= 0:
return coords
chain = np.zeros(coords.shape[0], 'bool')