Skip to content

Don't force reprojection when it is possible in the CLI accuracy workflow - #983

Draft
marinebcht wants to merge 2 commits into
GlacioHack:mainfrom
marinebcht:909_sampling_grid_none
Draft

Don't force reprojection when it is possible in the CLI accuracy workflow#983
marinebcht wants to merge 2 commits into
GlacioHack:mainfrom
marinebcht:909_sampling_grid_none

Conversation

@marinebcht

@marinebcht marinebcht commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

[Work In Progress]

Resolves #909

sampling_grid = None can be possible:

  • coreg with ICP and CPD (work even if datasets are not reprojected)
    • ICP/CPD methods only: OK
    • Other method(s) only: KO
    • ICP/CPD + other method(s): KO
  • no coreg : KO

Tests ne no resampling with :

  • overlapping dems: dem vs smaller dem
  • no overlapping dems ?

/!\ Openned GlacioHack/geoutils#900

@marinebcht
marinebcht marked this pull request as draft August 4, 2026 08:20
@marinebcht

Copy link
Copy Markdown
Contributor Author

Hey ! I found out that in even in ICP/CPD, there is a always a reprojection between ref and tba here

dem_to_be_aligned = dem_to_be_aligned.reproject(reference_dem, silent=True)
(in the _preprocess_coreg_fit_raster_raster function). Am I correct ? @rhugonnet (Checked #759 in case) Perhaps we should start there before working on the workflow extention @belletva

@belletva

belletva commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Hey ! I found out that in even in ICP/CPD, there is a always a reprojection between ref and tba here

dem_to_be_aligned = dem_to_be_aligned.reproject(reference_dem, silent=True)

(in the _preprocess_coreg_fit_raster_raster function). Am I correct ? @rhugonnet (Checked #759 in case) Perhaps we should start there before working on the workflow extention @belletva

good catch!

@rhugonnet

rhugonnet commented Aug 13, 2026

Copy link
Copy Markdown
Member

It is not forced in #759, with edits adding a reproj_same_grid argument:

https://github.com/rhugonnet/xdem/blob/5c9d8c3211db3024425135904c57fe11317f4245/xdem/coreg/base.py#L189

@marinebcht

marinebcht commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Oki top @rhugonnet read your PR #759 a little too quickly ! :)
I think I need to wait that this PR is finished @belletva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't force reprojection for all coreg method in the CLI accuracy workflow

3 participants