Skip to content

[0.4.5] Strengthen OSW coordinate and geometry validation#78

Merged
sujata-m merged 4 commits into
developfrom
feature-3982
Jul 23, 2026
Merged

[0.4.5] Strengthen OSW coordinate and geometry validation#78
sujata-m merged 4 commits into
developfrom
feature-3982

Conversation

@sujata-m

@sujata-m sujata-m commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

DevBoard

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

217 tests passed

sujata-m added 2 commits July 21, 2026 13:45
## 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
```
@sujata-m
sujata-m requested review from MashB and susrisha July 21, 2026 09:12
sujata-m added 2 commits July 21, 2026 23:32
…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`
@sujata-m
sujata-m merged commit 8c9f81d into develop Jul 23, 2026
4 checks passed
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.

3 participants