diff options
-rw-r--r-- | fietsboek/transformers/__init__.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fietsboek/transformers/__init__.py b/fietsboek/transformers/__init__.py index f6318d7..82f2a48 100644 --- a/fietsboek/transformers/__init__.py +++ b/fietsboek/transformers/__init__.py @@ -157,14 +157,11 @@ class FixNullElevation(Transformer): def execute(self, gpx: GPX): def all_points(): - return ( - point - for track in gpx.tracks - for segment in track.segments - for point in segment.points - ) + return gpx.walk(only_points=True) def rev_points(): + # We cannot use reversed(gpx.walk(...)) since that is not a + # generator, so we do it manually. return ( point for track in reversed(gpx.tracks) |