Skip to content

Commit

Permalink
linting and adding changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik12 committed May 17, 2024
1 parent aae6c89 commit 9d6882b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/47.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adding `predicate` as a named parameter in `str_tree.query`
4 changes: 3 additions & 1 deletion src/centerline/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def _construct_centerline(self):
linestrings.append(linestring)

str_tree = STRtree(linestrings)
linestrings_indexes = str_tree.query(self._input_geometry, predicate="contains")
linestrings_indexes = str_tree.query(
self._input_geometry, predicate="contains"
)
contained_linestrings = [linestrings[i] for i in linestrings_indexes]
if len(contained_linestrings) < 2:
raise exceptions.TooFewRidgesError
Expand Down

0 comments on commit 9d6882b

Please sign in to comment.