pytroll / pytroll/pyresample

Negative pixel size if area is flipped

Open
#433 8 comments 0 reactions 1 assignee View on GitHub

@sfinkens is already working on this.

Since May 11, 2022.

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

Description

Code Sample, a minimal, complete, and verifiable piece of code
from pyresample.geometry import AreaDefinition

area_def = AreaDefinition(
    "test",
    "test",
    "test",
    projection={"proj": "geos", "lon_0": 0, "h": 35785831.0},
    width=2,
    height=2,
    area_extent=[1, 1, -1, -1]   # flipped, upper right corner is S-E
)
area_def.pixel_size_x

Problem description

The pixel_size_x/y attribute of a flipped area is negative.

Expected Output

1.0

Actual Result, Traceback if applicable

-1.0

Versions of Python, package at hand and relevant dependencies

pyresample-1.22.3

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.