Skip to content

Commit

Permalink
Change default STRtree leaf size (node capacity) to 10 (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Jan 30, 2021
1 parent 4210414 commit 3ef1590
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Version 0.10 (unreleased)

* ...

**API Changes**

* STRtree default leaf size is now 10 instead of 5, for somewhat better performance
under normal conditions.

**Added GEOS functions**

* Addition of a ``contains_properly`` function (#267).
Expand Down
2 changes: 1 addition & 1 deletion pygeos/strtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class STRtree:
[[0, 0, 0, 1, 1], [2, 3, 4, 5, 6]]
"""

def __init__(self, geometries, leafsize=5):
def __init__(self, geometries, leafsize=10):
self.geometries = np.asarray(geometries, dtype=np.object_)
self._tree = lib.STRtree(self.geometries, leafsize)

Expand Down

0 comments on commit 3ef1590

Please sign in to comment.