Skip to content

ENH: Expose target_crs in georeference accessor#360

Merged
kmuehlbauer merged 3 commits intoopenradar:mainfrom
syedhamidali:feat/projection-fix
Apr 23, 2026
Merged

ENH: Expose target_crs in georeference accessor#360
kmuehlbauer merged 3 commits intoopenradar:mainfrom
syedhamidali:feat/projection-fix

Conversation

@syedhamidali
Copy link
Copy Markdown
Member

Description

Follow-up to #300: wires the target_crs parameter through the .xradar.georeference() accessor on DataArray, Dataset, and DataTree, so users can reproject radar coordinates in a single accessor call instead of reaching for xd.georeference.get_x_y_z_tree(...).

Example

radar = radar.xradar.georeference(target_crs=4326)   # lon/lat
radar = radar.xradar.georeference(target_crs="EPSG:3857")  # web mercator

Addresses the follow-up API request in #243 / #300 (comment by @kmuehlbauer).

Changes

xradar/accessors.py: forward target_crs through georeference() on all three accessors.
tests/test_accessors.py: two new tests covering target_crs=4326 for Dataset and DataTree, verifying geographic attrs and reprojected origin.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.85%. Comparing base (961a819) to head (28acd6b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   93.85%   93.85%           
=======================================
  Files          28       28           
  Lines        6166     6166           
=======================================
  Hits         5787     5787           
  Misses        379      379           
Flag Coverage Δ
notebooktests 0.00% <ø> (ø)
unittests 93.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@syedhamidali syedhamidali added the enhancement New feature or request label Apr 19, 2026
@syedhamidali syedhamidali self-assigned this Apr 20, 2026
Copy link
Copy Markdown
Collaborator

@kmuehlbauer kmuehlbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor issues, after resolving, this can get in. Thanks @syedhamidali.

Comment thread docs/history.md
Comment thread docs/notebooks/Georeference_TargetCRS.ipynb Outdated
@kmuehlbauer kmuehlbauer merged commit e8e905a into openradar:main Apr 23, 2026
11 checks passed
@kmuehlbauer
Copy link
Copy Markdown
Collaborator

Thanks @syedhamidali!

@syedhamidali syedhamidali deleted the feat/projection-fix branch April 23, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

ENH: Consider adding lat, lon and alt option in georeferencing

2 participants