pytroll / pytroll/pyresample

area not equal after storing and loading

Open
#430 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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 pyproj import CRS
from pyresample import create_area_def
from pyresample.area_config import load_area_from_string
ar = create_area_def("test", CRS.from_authority("IAU_2015", 39916), area_extent=[-10_000_000, -10_000_000, 10_000_000, 10_000_000], resolution=10000)
ar2 = load_area_from_string(ar.dump())
print(ar == ar2)
Problem description

After storing and loading, the areas should be equal. Even considering floating point precision.

Expected Output
True
Actual Result, Traceback if applicable
/data/gholl/mambaforge/envs/py310/lib/python3.10/site-packages/pyproj/crs/crs.py:1256: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  return self._crs.to_proj4(version=version)
False
Versions of Python, package at hand and relevant dependencies

pyresample v1.23.0.

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.

Research direction

Start by reproducing the example with create_area_def, dump, load_area_from_string, and the area equality check. Trace how the area and CRS are serialized and restored, then add or update coverage so storing and loading the area compares equal within floating-point precision.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.