Skip to content

ENH: Expose target_crs in georeference accessor#360

Open
syedhamidali wants to merge 1 commit intoopenradar:mainfrom
syedhamidali:feat/projection-fix
Open

ENH: Expose target_crs in georeference accessor#360
syedhamidali wants to merge 1 commit intoopenradar:mainfrom
syedhamidali:feat/projection-fix

Conversation

@syedhamidali
Copy link
Copy Markdown
Contributor

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 (6cba751) to head (694bfaa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   93.85%   93.85%           
=======================================
  Files          28       28           
  Lines        6165     6165           
=======================================
  Hits         5786     5786           
  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
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

1 participant