validate_all() suggestion: decouple validation from fixes #146
tm-jc-nacpil
started this conversation in
Enhancements Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Decouple applying fixes to validation.
While doing the UAT, the behavior of
validate_all()
was confusing for me. It seems like whenapply_fix = True
, the validation columns of the returned dataframe describe the input geometries, not the output. So the immediate interpretation is that the output dataframe still has these errors, even if the geometries are already fixed. I think it would be more useful if it described the output instead, so that a user can safely assume that the dataframe accurately describes the geometries that were returned.Another suggestion would be to make the default be
apply_fix = False
, so that a user must intentionally set it to True to modify the geometries.It would also be nice to have validation be a separate method from actually fixing these errors. There might be usecases where I want to know the errors first, before applying any fixes. The workflow I imagine would be something like
validate_all(gdf)
to identify errors in the dataframeapply_fixes(gdf, list of validatators to attempt fixing)
validate_all(gdf)
to see if the fixes workBeta Was this translation helpful? Give feedback.
All reactions