Skip to content

Commit

Permalink
Add itergroups method to collection
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqshihadah committed Jun 24, 2022
1 parent 4c051bf commit e9c98d0
Show file tree
Hide file tree
Showing 6 changed files with 360 additions and 2 deletions.
Binary file added Media/Linref_Logo_Simple_Black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 164 additions & 0 deletions Media/Linref_Logo_Simple_Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media/Linref_Logo_Simple_White.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 164 additions & 0 deletions Media/Linref_Logo_Simple_White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions linref/events/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,14 @@ def _validate_cols(self, cols=None, require=False):
# Return validated columns
return cols

def iter_groups(self):
"""
Return an iterator which will iterate through all groups in the
collection, yielding each group's key as well as the associated
EventsGroup.
"""
return ((key, self.get_group(key)) for key in self.group_keys_unique)

def build_routes(self, label='route', errors='raise'):
"""
Build MLSRoute instances for each event based on available geometry
Expand Down
Loading

0 comments on commit e9c98d0

Please sign in to comment.