pytroll / pytroll/satpy

Satpy doesnt't skip resampling if source and target areas match exactly

Open
#1,102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
335
Avg merge
1d 18h
Merged PRs (30d)
10

Description

If I resample a static image with a given projection like euro1 to the same projection Satpy should skip the resampling. At the moment resampling seems to take place.

To Reproduce

Code:

area = 'euro1'
new_scene = global_scene.resample(area, radius_of_influence = 20000, cache_dir='/tmp')

Composite:

  static_day_euro1:
    compositor: !!python/name:satpy.composites.StaticImageCompositor
    standard_name: static_night
    filename: /home/cpeters/satpy/backgrounds/euro1_day.png
    area: euro1

As provided by @pnuu , some check like

if self.source_geo_def == self.target_geo_def

should take place.

Contributor guide

Open the contributing guide

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.

Research direction

Start from the scene resample call shown in the issue and trace how source and target area definitions are compared. Reproduce the euro1 to euro1 case, then verify that exact matching areas avoid resampling while differing areas still resample.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, performance
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.