summaryrefslogtreecommitdiff
path: root/lib/utils/geometry.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/geometry.py')
-rw-r--r--lib/utils/geometry.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/utils/geometry.py b/lib/utils/geometry.py
index bfdcd3c0..ef5f12b5 100644
--- a/lib/utils/geometry.py
+++ b/lib/utils/geometry.py
@@ -17,7 +17,7 @@ def cut(line, distance):
last_point = p
if traveled == distance:
return [
- LineString(coords[:i+1]),
+ LineString(coords[:i + 1]),
LineString(coords[i:])]
if traveled > distance:
cp = line.interpolate(distance)
@@ -25,6 +25,7 @@ def cut(line, distance):
LineString(coords[:i] + [(cp.x, cp.y)]),
LineString([(cp.x, cp.y)] + coords[i:])]
+
def cut_path(points, length):
"""Return a subsection of at the start of the path that is length units long.
@@ -79,7 +80,7 @@ class Point:
if isinstance(other, (int, float)):
return self * (1.0 / other)
else:
- raise ValueErorr("cannot divide Point by %s" % type(other))
+ raise ValueError("cannot divide Point by %s" % type(other))
def __repr__(self):
return "Point(%s,%s)" % (self.x, self.y)