[0.4.5] Strengthen OSW coordinate and geometry validation#78
Merged
Conversation
## DevBoard - https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3982 - https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/4047 - https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/4048 ## Changes - Removed the previous `1e-7` coordinate tolerance. - Edge `_u_id` and `_v_id` endpoints must exactly match referenced node coordinates. - Zone `_w_id` vertices must exactly match referenced node coordinates. - Detects coordinates with more than seven decimal places. - Reports a non-blocking message through `result.warnings`. - Does not modify validation errors, input data, or `is_valid`. - Rejects edges, lines, polygons, and zones containing more than 2,000 vertices. - Exactly 2,000 vertices remain valid. - Supports polygon interior rings, multi-geometries, and external extensions. - Respects `max_errors`. - Improved zero-length edge reporting - Replaced the generic invalid-geometry message with a feature-level error. - Includes the edge ID, dataset, and feature index. - Prevents duplicate generic errors for the same edge. - Does not reject non-zero geometries that only have a declared `length` value of `0`. - Added real Bellevue OSW reproduction datasets for: - Non-zero geometry with `length: 0`. - Actual zero-length geometry with identical coordinates. - Updated package version to `0.4.5`. - Updated `CHANGELOG.md`. ## Validation ```text 205 tests passed 16 subtests passed ```
…000-vertex limit, seven-decimal coordinate warning threshold, and zero-length line handling per validator instance. Zero-length `LineString` geometries are rejected by default and can be allowed with `allow_zero_length_lines=True`
susrisha
approved these changes
Jul 23, 2026
MashB
approved these changes
Jul 23, 2026
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.
DevBoard
Changes
Removed the previous
1e-7coordinate tolerance.Edge
_u_idand_v_idendpoints must exactly match referenced node coordinates.Zone
_w_idvertices must exactly match referenced node coordinates.Detects coordinates with more than seven decimal places.
Reports a non-blocking message through
result.warnings.Does not modify validation errors, input data, or
is_valid.Rejects edges, lines, polygons, and zones containing more than 2,000 vertices.
Exactly 2,000 vertices remain valid.
Supports polygon interior rings, multi-geometries, and external extensions.
Respects
max_errors.Improved zero-length edge reporting
lengthvalue of0.Added real Bellevue OSW reproduction datasets for:
length: 0.Updated package version to
0.4.5.Updated
CHANGELOG.md.Validation