Skip to content

Correct GeoJSON ring orientation#2977

Merged
grischard merged 1 commit into
osmlab:gh-pagesfrom
KTibow:fix-ring-orientation-2974-2975
Jun 15, 2026
Merged

Correct GeoJSON ring orientation#2977
grischard merged 1 commit into
osmlab:gh-pagesfrom
KTibow:fix-ring-orientation-2974-2975

Conversation

@KTibow

@KTibow KTibow commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Correct all remaining source geometries whose ring orientation does not match GeoJSON RFC7946.

This applies the same orientation convention enforced by scripts/strict_check.py: exterior rings counterclockwise and interior rings clockwise.

Why this is needed:

  • Issue Ensure same polygon orientation for all geometries #1455 explicitly called for consistent polygon orientation across sources.
  • PR Check for ring orientation #1464 added the strict-check validation and emitted corrected geometries for non-RFC7946 rings.
  • Commit 9c87fca previously updated existing sources to match RFC7946 orientation.
  • Some later direct/source additions and updates can still bypass this until those files are changed in a PR, because .github/workflows/pull_request.yml runs scripts/strict_check.py only on changed files while .github/workflows/push.yml runs the basic check only.

This PR is geometry-only: properties, URLs, attribution, dates, and other source metadata are unchanged.

This is blocking follow-up maintenance PRs #2974 and #2975: those PRs touch existing source files, which causes strict_check.py to run on them and surface latent RFC7946 ring-orientation failures unrelated to the intended metadata/URL changes.

Validation performed:

  • Reoriented all sources/**/*.geojson polygons and multipolygons using Shapely orient(..., sign=1.0), matching the helper used by strict_check.py.
  • Verified no source geometries still differ from that RFC7946-oriented output.
  • Verified changed files have no non-geometry JSON changes.
  • Ran git diff --check.

Disclosure: Generated by GPT 5.5 with human oversight

@KTibow

KTibow commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Tests are failing but I would rather keep this scoped to GeoJSON rather than adding "https://www.unioncountync.gov/favicon.ico" and "privacy_policy_url": false.

@grischard

Copy link
Copy Markdown
Collaborator

Beautiful

@grischard grischard merged commit b7c638c into osmlab:gh-pages Jun 15, 2026
1 check failed
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.

2 participants