Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation and warnings before 0.1 release #502

Merged
merged 57 commits into from
Nov 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
915fd1c
Incremental commit on streamlined doc and user warnings
rhugonnet Apr 8, 2024
2085bdb
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Apr 28, 2024
526904c
Incremental commit on documentation
rhugonnet Apr 30, 2024
1968f37
Incremental commit on documentation
rhugonnet Apr 30, 2024
507007f
Incremental commit for doc
rhugonnet May 6, 2024
ea8fb99
Homogenize contributor
rhugonnet May 6, 2024
1260677
Incremental commit on doc
rhugonnet May 7, 2024
dc8469d
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet May 13, 2024
e230033
Linting
rhugonnet May 13, 2024
fe1c9f0
Incremental commit
rhugonnet May 17, 2024
461d61e
Incremental commit
rhugonnet May 22, 2024
9d657ea
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet May 23, 2024
5c862c6
Show more toc levels
rhugonnet Jun 14, 2024
84d517e
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Jun 15, 2024
22bb334
Add custom css rule for toggle buttons
rhugonnet Jun 16, 2024
1086e0c
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Sep 5, 2024
767c440
Incremental commit on doc
rhugonnet Sep 7, 2024
b508171
Incremental commit on doc
rhugonnet Sep 10, 2024
35cf9dd
Add table for coregistration methods
rhugonnet Sep 11, 2024
dfeab70
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Sep 11, 2024
254833a
Add timeout to terrain and finalize coreg
rhugonnet Sep 12, 2024
9f9b05d
Incremental commit on doc
rhugonnet Sep 19, 2024
32b6ecf
Incremental commit on doc
rhugonnet Oct 2, 2024
2893605
Finalize new uncertainty page
rhugonnet Oct 5, 2024
71718c0
Remove blockwise coreg example temporarily
rhugonnet Oct 5, 2024
caf2f33
Add pipeline info()
rhugonnet Oct 5, 2024
20b3c4f
Eriks comments
rhugonnet Oct 6, 2024
4633ac9
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Oct 6, 2024
0f29bd1
Linting
rhugonnet Oct 6, 2024
7e2dc97
Fixes for tests
rhugonnet Oct 6, 2024
4e4bfd0
Fix directional bias example
rhugonnet Oct 7, 2024
073f494
Incremental commit on doc
rhugonnet Oct 22, 2024
177db6d
Almost there!
rhugonnet Oct 24, 2024
1f6d9bb
Linting
rhugonnet Oct 24, 2024
584fa09
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Oct 24, 2024
8c1ed70
Reduce build time of documentation
rhugonnet Oct 25, 2024
4aff93f
Add citation and use in publication, streamline old gallery examples
rhugonnet Oct 26, 2024
1831031
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Oct 28, 2024
2863453
Fix errors in documentation
rhugonnet Oct 28, 2024
9c6095c
Linting
rhugonnet Oct 28, 2024
eb715a1
Incremental commit on doc
rhugonnet Oct 29, 2024
a4bb1c2
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Oct 29, 2024
dbd791d
Incremental commit on doc
rhugonnet Oct 30, 2024
b1f783a
Linting
rhugonnet Oct 30, 2024
e33a2a5
Last streamlining for loggging
rhugonnet Oct 30, 2024
3fa4e88
Linting
rhugonnet Oct 30, 2024
746f961
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet Oct 31, 2024
c368f74
Fix test_info with new as_str argument
rhugonnet Oct 31, 2024
e79d93e
Try vertical CRS transformation with grid for cheatsheet (running out…
rhugonnet Oct 31, 2024
a7149d7
Revert cheatsheet vertical CRRS code...
rhugonnet Oct 31, 2024
b81b14e
Comments from Amaury and Erik
rhugonnet Nov 7, 2024
3b4d9f4
Linting
rhugonnet Nov 7, 2024
5e6f08b
Last changes
rhugonnet Nov 7, 2024
1c15c37
Linting
rhugonnet Nov 7, 2024
9b401bb
Bump cache number
rhugonnet Nov 7, 2024
53b832d
Remove windows temporarily
rhugonnet Nov 7, 2024
c3cbc37
Modify linear to idw everywhere
rhugonnet Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into towards_0.1
rhugonnet committed Jun 15, 2024
commit 84d517e377f5147d8c0954f8e00dd7b36201d777
42 changes: 0 additions & 42 deletions xdem/coreg/base.py
Original file line number Diff line number Diff line change
@@ -755,48 +755,6 @@ def _apply_matrix_pts_arr(
z: NDArrayf,
matrix: NDArrayf,
centroid: tuple[float, float, float] | None = None,
resampling: int | str = "bilinear",
transform: rio.transform.Affine = None,
z_name: str = "z",
) -> NDArrayf | gu.Raster | gpd.GeoDataFrame:
"""
Apply a 3D affine transformation matrix to a 3D elevation point cloud or 2.5D DEM.

:param elev: Elevation point cloud or DEM to transform, either a 2D array (requires transform) or
geodataframe (requires z_name).
:param matrix: Affine (4x4) transformation matrix to apply to the DEM.
:param invert: Whether to invert the transformation matrix.
:param centroid: The X/Y/Z transformation centroid. Irrelevant for pure translations.
Defaults to the midpoint (Z=0).
:param resampling: The resampling method to use, only for DEM 2.5D transformation. Can be `nearest`, `bilinear`,
`cubic` or an integer from 0-5.
:param transform: Geotransform of the DEM, only for DEM passed as 2D array.
:param z_name: Column name to use as elevation, only for point elevation data passed as geodataframe.
:return:
"""

if isinstance(elev, gpd.GeoDataFrame):
return _apply_matrix_pts(epc=elev, matrix=matrix, invert=invert, centroid=centroid, z_name=z_name)
else:
if isinstance(elev, gu.Raster):
transform = elev.transform
dem = elev.data
else:
dem = elev

# TODO: Add exception for translation to update only geotransform, maybe directly in apply_matrix?
applied_dem = _apply_matrix_rst(
dem=dem, transform=transform, matrix=matrix, invert=invert, centroid=centroid, resampling=resampling
)
if isinstance(elev, gu.Raster):
applied_dem = DEM.from_array(applied_dem, transform, elev.crs, elev.nodata)
return applied_dem


def _apply_matrix_rst(
dem: NDArrayf,
transform: rio.transform.Affine,
matrix: NDArrayf,
invert: bool = False,
) -> tuple[NDArrayf, NDArrayf, NDArrayf]:
"""Apply matrix to points as arrays with array outputs (to improve speed in some functions)."""
You are viewing a condensed version of this merge commit. You can view the full changes here.