diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2019-02-16 17:07:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-16 17:07:34 -0500 |
| commit | 2ab4c451e8042868b2516a6b3fe1f60836f27ffe (patch) | |
| tree | 0ce616ac57e6a2aa507461486233c71373467c9a /lib/utils | |
| parent | bd6e4d9d32fd314b66f3c5d798c7151bf543d07f (diff) | |
| parent | fa3236372bcee28f4aaa78da47b68c5d7f32cca4 (diff) | |
tons of bug fixes (#364)
bug fixes
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/geometry.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/utils/geometry.py b/lib/utils/geometry.py index ab7f24c1..05cfc4b2 100644 --- a/lib/utils/geometry.py +++ b/lib/utils/geometry.py @@ -1,6 +1,7 @@ -from shapely.geometry import LineString, Point as ShapelyPoint import math +from shapely.geometry import LineString, Point as ShapelyPoint + def cut(line, distance, normalized=False): """ Cuts a LineString in two at a distance from its starting point. @@ -51,9 +52,8 @@ def cut_path(points, length): def collapse_duplicate_point(geometry): - if hasattr(geometry, 'geoms'): - if geometry.area < 0.01: - return geometry.representative_point() + if geometry.area < 0.01: + return geometry.representative_point() return geometry |
