Skip to content

Conversation

@MatthieuCMira
Copy link
Contributor

@MatthieuCMira MatthieuCMira commented Dec 19, 2025

GEOPY-2591 - geoimage/grid2d conversion of non rectangular geoimage
avoid more bugs with geoimage:

1/ georeferencing now acts normaly. (however tie points must meet certain conditions)

2/ more protections to convert to grid2d

3/ add unittests

Matthieu Cedou added 4 commits December 18, 2025 13:57
getting there
change the tests
I also tested a bit with real data and it's seems good.

Good luck for testing exhaustively.... :-/
@github-actions github-actions bot changed the title Geopy 2591 GEOPY-2591: geoimage/grid2d conversion of non rectangular geoimage Dec 19, 2025
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 95.06173% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.17%. Comparing base (5849378) to head (39cf005).

Files with missing lines Patch % Lines
geoh5py/objects/geo_image.py 95.04% 3 Missing and 3 partials ⚠️
geoh5py/shared/utils.py 92.30% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #826      +/-   ##
===========================================
+ Coverage    91.07%   91.17%   +0.09%     
===========================================
  Files          115      115              
  Lines        10119    10240     +121     
  Branches      1877     1903      +26     
===========================================
+ Hits          9216     9336     +120     
- Misses         481      482       +1     
  Partials       422      422              
Files with missing lines Coverage Δ
geoh5py/__init__.py 55.55% <ø> (ø)
geoh5py/data/__init__.py 100.00% <ø> (ø)
geoh5py/data/blob_data.py 66.66% <ø> (ø)
geoh5py/data/boolean_data.py 100.00% <ø> (ø)
geoh5py/data/color_map.py 92.15% <ø> (ø)
geoh5py/data/colour.py 98.30% <ø> (ø)
geoh5py/data/data.py 90.78% <ø> (ø)
geoh5py/data/data_association_enum.py 100.00% <ø> (ø)
geoh5py/data/data_type.py 94.63% <ø> (ø)
geoh5py/data/data_unit.py 66.66% <ø> (ø)
... and 105 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@benk-mira benk-mira left a comment

Choose a reason for hiding this comment

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

Just a few comments, looks great!

benk-mira
benk-mira previously approved these changes Dec 22, 2025
Comment on lines 828 to 832
Compute world coordinates of image corners from 2 tie points,
assuming:
- rotation (yaw) = 0,
- dip direction = v (pixel j),
- x = f(i), y = g(j), z = h(j) (no shear).
Copy link
Contributor

@domfournier domfournier Jan 5, 2026

Choose a reason for hiding this comment

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

I don't really understand the logic here. I would think it is possible to stretch and orient any two pixels in space be defining there coordinates in 3D space. The stretch will have to be isometric, and can only define two angles, but i don't see why need the i's and the j's to be different... something like this
image

Copy link
Contributor

Choose a reason for hiding this comment

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

1- Define what the pixel size has to be based on pixel_distance / real_distance (isometric)
2- Define an azimuth and dip angles defining the vector connecting the two points
3- Apply the transfomation (shift, stretch + rotations) to the four corners.

Maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this figure, are we agreeing the image can be infinitely rotated along the axis defined by the 2 points right?

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.

4 participants