Skip to content

Commit

Permalink
Add link to performance info in parameter docstring of strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
theroggy authored and dbaston committed Aug 30, 2024
1 parent 484d10b commit 80c2f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions python/doc/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ With relatively few polygons (hydrologic levels 1-6, up 3500 polygons) processin
As the number of polygons increases, the resolution of the population raster becomes less significant.
At hydrologic levels 9 and 12 (approximately 1 million and 2 million polygons, respectively), increasing the resolution by a factor of 120 increases runtime by only 45%.

.. _performance-processing-strategies:

Processing strategies
---------------------
Expand Down
8 changes: 5 additions & 3 deletions python/src/exactextract/exact_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,17 @@ def exact_extract(
should be copied from the input features into
the output.
strategy: Specifies the strategy to use when processing features.
Must be set to one of:
Detailed performance notes are available in
:ref:`Performance - Processing strategies <performance-processing-strategies>`.
Must be set to one of:
- ``"feature-sequential"`` (the default):
iterate over the features in ``vec``,
read the corresponding pixels from ``rast``/``weights``,
and compute the summary operations. This offers predictable
memory consumption but may be inefficient if the order of
features in ``vec`` causes the same raster blocks to be read
and decompressed.
features in ``vec`` causes the same, relatively large raster
blocks to be read and decompressed many times.
- ``"raster-sequential"``:
iterate over chunks of pixels in ``rast``, identify the intersecting
Expand Down

0 comments on commit 80c2f82

Please sign in to comment.