pytroll / pytroll/pyresample

Add `create_resampler` helper function

Open
#357 0 comments 0 reactions 4 assignees View on GitHub

@pnuu is already working on this.

Since May 20, 2021.

enhancement
Dominant language
Python
Stars
385
Forks
102
Avg merge
4d 2h
Merged PRs (30d)
9

Description

Context

The assigned developers (among others) have been meeting during the Spring 2021 PCW to discuss a Pyresample 2.0. This issue discusses one of the changes that we think should be implemented on our road to version 2.0. Most features for version 2.0 will be backwards compatible and will not require a deprecation cycle.

For related issues, see the other issues in the v2.0 milestone (see sidebar).

Proposal

In recent development of pyresample we have started created "Resampler" classes which encapsulate the basic operations of resampling array-like data. Right now to use these a user has to know what class they want to use so they can import it and then use it. We've decided that to simplify things for the user we should create a create_resampler class.

Usage
from pyresample import create_resampler

resampler = create_resampler(src_geom, dst_geom, resampler='nearest')
resampled_data = resampler.resample(data, **kwargs)

Note that this requires assigning a name to every resampler. This is itself another big feature of v2.0 and will be discussed in another issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.