pytroll / pytroll/python-geotiepoints
Move cartesian coordinate handling to a utils package
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 30
- Forks
- 19
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 5
Description
Cartesian coordinate handling could be generalized in a utils-package, something like:
from functools import wraps
def use_carts(use_carts=False, latitude_xy_threshold=60):
"""Convert input to a function to cartesian and back."""
def decorator(func):
@wraps(func)
def wrapper(data, **kwargs):
if use_carts:
data = _lonlat2xyz(*data)
result = func(data, **kwargs)
if use_carts:
result = _xyz2lonlat(*result, latitude_xy_threshold=latitude_xy_threshold)
return result
return wrapper
return decorator
Usage would be simplified to
interpolate = use_carts(to_cart)(tie_points_interpolation)
return interpolate([longitude, latitude], scan_alt_tie_points, tie_points_factor)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing cartesian conversion helpers and tie_points_interpolation entry point referenced in the issue. Review how coordinate conversion is currently handled across the package, then determine which shared utility and call sites need to use the proposed decorator. Done means cartesian handling is centralized and the affected interpolation behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100