Fix polygon approximation for 0 or less tolerance

This commit is contained in:
Johannes Schönberger
2012-10-06 19:05:11 +02:00
parent 00dbb5e4e3
commit d1629aec0f
+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')