-
Notifications
You must be signed in to change notification settings - Fork 0
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
dedicated minimal tests -- nodes.remove_false_nodes()
#59
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
=======================================
+ Coverage 98.1% 98.3% +0.2%
=======================================
Files 6 6
Lines 894 894
=======================================
+ Hits 877 879 +2
+ Misses 17 15 -2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably also copy all the tests from momepy here.
We are not expecting the same results here, though right? Just trying the first little block locally and it fails.
|
Not entirely sure on those test data to be fair. The one in sgeop does contain some fixes but it may be worth verifying the differences. |
OK after the PR on the |
Wrong, I was using |
Key piece in # explode to avoid MultiLineStrings
# reset index due to the bug in GeoPandas explode
df = gdf.reset_index(drop=True).explode(ignore_index=True) |
When adding the line above into # check loop order
expected = np.array(
[
[-727238.49292668, -1052817.28071986],
[-727253.1752498, -1052827.47329062],
[-727223.93217677, -1052829.47624082],
[-727238.49292668, -1052817.28071986],
]
)
np.testing.assert_almost_equal(
np.array(fixed.loc[53].geometry.coords), expected
) This appears to be due to the indices of the resultant edges not lining up, and the index location produced from the |
Co-authored-by: Martin Fleischmann <[email protected]>
Let's also add notes on 3D geometry being downcast, potentially. And about MultiLineStrings being exploded. |
…des' into GH20_nodes_tests_remove_false_nodes
This PR:
nodes.remove_false_nodes()
sgeop.nodes.remove_false_nodes
when multilinestrings passed #60preprocess.remove_false_nodes()
pysal/momepy#661