feat(testing): add assert_geoseries_coordinates_equal#125
Merged
Conversation
nlssakokorhonen
approved these changes
Jun 4, 2026
nlssakokorhonen
left a comment
Contributor
There was a problem hiding this comment.
Just a minor detail, imho the function name "assert_geoseries_z_values_match" is a bit misleading. I would expect the function to check only z coordinates instead of geometry type and all the coordinates. The code would be easier to read if you can come up with a better name for the function.
ccc03e8 to
ca7d499
Compare
Collaborator
Author
|
Good point, I'll change the name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
assert_geoseries_equalandassert_geodataframe_equaldo not check if geometries have the same z coordinates. If you use the plain Pandasassert_series_equalit does check for z coordinates. This has been used so far, but this allows only exact checking so you can't enablecheck_less_precise.This PR adds
[assert_geoseries_coordinates_equal](https://github.com/nlsfi/geogen-algorithms/pull/125/commits/ca7d499125a179c91cd1b81009a6a97b9f3497af)which explicitly check that all coordinates including Z match in two GeoSeries.This is required because in #124 we get an issue where it looks like for some reason depending on the OS (Windows/Linux) you get slightly different coordinates on some vertices (on the millimiter or less scale), leading tests to fail on one OS or the other. This change allows to use the
check_less_preciseparameter to ignore miniscule differences like this.Type of change
Bug fix
New feature
Other
Non-breaking change
Breaking change
Developer checklist