Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: library of convolution kernels #268

Closed
phargogh opened this issue Jul 20, 2022 · 1 comment · Fixed by #303
Closed

Proposal: library of convolution kernels #268

phargogh opened this issue Jul 20, 2022 · 1 comment · Fixed by #303
Assignees
Labels
enhancement New feature or request in progress Working on it!
Milestone

Comments

@phargogh
Copy link
Member

pygeoprocessing.convolve_2d has some pretty stringent requirements for how a kernel must be formatted (must be a spatial raster, best if it's tiled, spatial reference needs to be set, but it doesn't matter what it is), and so just formatting your kernel correctly is a pretty high bar before convolve_2d can even be used.

I propose:

  • Creating a library of convolution kernels, pygeoprocessing.kernels containing kernel-related utilities
  • Moving kernel creation functions used in InVEST that follow standard kernel models (e.g. gaussian, linear, etc.) over to pygeoprocessing.kernels
  • Creating some helper functions (as needed) in this subpackage to help standardize the creation of kernels.
@phargogh phargogh added the enhancement New feature or request label Jul 20, 2022
@phargogh phargogh self-assigned this Jul 20, 2022
@phargogh phargogh added the in progress Working on it! label Nov 1, 2022
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Nov 1, 2022
The first function there is to create a distance-based kernel.

Untested, but linting passes.

RE:natcap#268
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Nov 1, 2022
These _should_ work, but there's still a need to test them and make sure
that they cover all the edge cases we're using in InVEST.

RE:natcap#268
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Nov 1, 2022
@phargogh
Copy link
Member Author

phargogh commented Nov 1, 2022

Working on this in my fork at feature/268-library-of-convolution-kernels.

@phargogh phargogh added this to the 2.4.0 milestone Dec 2, 2022
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
Also adding max_dist to locals exposed during eval. RE:natcap#268
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
I remember GDAL issuing a warning a long time ago if no SRS was defined,
but that no longer seems to be the case.  Both GDAL and QGIS seem to
have decided that the SRS doesn't matter any longer.  This commit
removes the spatial metadata information from kernel creation.

RE:natcap#268
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
Needed for the InVEST Stormwater model. RE:natcap#268
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 5, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 8, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 11, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 11, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 11, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 11, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 11, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 11, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 13, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 15, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 22, 2023
@emlys emlys closed this as completed in #303 Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress Working on it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant