Skip to content

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

Merged
sujata-m merged 3 commits into
developfrom
feature-4066
Jul 23, 2026
Merged

[0.3.7] Fix zero-length geometry and preserve non-compliant tags as extensions#55
sujata-m merged 3 commits into
developfrom
feature-4066

Conversation

@sujata-m

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

Copy link
Copy Markdown
Contributor

DevBoard

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

288 tests passed

sujata-m added 2 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
```
@sujata-m sujata-m changed the title Fix zero-length geometry cleanup and preserve non-compliant tags as extensions [0.3.7] Fix zero-length geometry and preserve non-compliant tags as extensions Jul 22, 2026
@sujata-m
sujata-m merged commit b865dcf into develop Jul 23, 2026
1 check 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