Skip to content

[0.3.7] Fix zero-length geometry and preserve non-compliant tags as extensions - #56

Merged
sujata-m merged 4 commits into
mainfrom
develop
Jul 23, 2026
Merged

[0.3.7] Fix zero-length geometry and preserve non-compliant tags as extensions#56
sujata-m merged 4 commits into
mainfrom
develop

Conversation

@sujata-m

@sujata-m sujata-m commented Jul 23, 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 and others added 4 commits July 22, 2026 15:46
…xtensions

## DevBoard
- https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/4066

## Changes

- Added shared geometry cleanup helpers for LineString, Polygon, MultiLineString, and MultiPolygon geometries.
- Removes duplicate consecutive coordinates from line and polygon geometries.
- Prevents zero-length LineString geometries from being emitted as OSW edges or lines.
- Prevents collapsed or zero-area Polygon geometries from being emitted as OSW polygons or zones.
- OSM edge segments with identical endpoint coordinates are no longer emitted as OSW edges, even when node IDs differ.
- Collapsed OSM edge/way features are preserved as valid custom OSW points when a coordinate is available.
- Fallback custom OSW points preserve original way tags as `ext:*`.
- Prevents invalid OSW node output containing edge properties like `highway`, `footway`, or `surface`.
- OSW→OSM collapsed edges, lines, polygons, and zones are converted to OSM node/Point fallbacks instead of being silently dropped.
- OSW→OSM duplicate consecutive coordinates are cleaned before conversion.
- OSM→OSW unknown, unsupported, or non-OSW-compliant tags are preserved as `ext:*`.
- Invalid values for known OSW fields are preserved as `ext:*` instead of being dropped.
- Existing `ext:*` tags remain unchanged.
- Added real-format OSM XML fixtures for zero-length OSM scenarios.
- Added zipped OSW datasets for zero-length OSW scenarios.
- Added consolidated zero-length geometry unit coverage.
- Updated OSW normalizer tests for `ext:*` preservation behavior.

## Validation

```text
288 tests passed
```
[0.3.7] Fix zero-length geometry and preserve non-compliant tags as extensions
@sujata-m sujata-m changed the title [0.4.5] Strengthen OSW coordinate and geometry validation [0.3.7] Fix zero-length geometry and preserve non-compliant tags as extensions Jul 23, 2026
@sujata-m
sujata-m requested a review from MashB July 23, 2026 12:55
@sujata-m
sujata-m merged commit a18ae5c into main Jul 23, 2026
2 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