Skip to content

Fix: Remove duplicate non-adjacent points in movement geometry - #1171

Open
zeofr wants to merge 1 commit into
a-b-street:mainfrom
zeofr:fix-cairo-map-import
Open

Fix: Remove duplicate non-adjacent points in movement geometry#1171
zeofr wants to merge 1 commit into
a-b-street:mainfrom
zeofr:fix-cairo-map-import

Conversation

@zeofr

@zeofr zeofr commented Nov 26, 2025

Copy link
Copy Markdown

Fixes #1157

Fixes #1157 by deduplicating all points (not just consecutive ones) before creating movement polylines. Uses a 1cm epsilon tolerance for floating point comparison to handle near-duplicate points.

Tested successfully:

  • Cairo map imports without 'dupe non-adjacent pts' warnings
  • Map loads and displays correctly in sandbox mode
  • All map_model tests pass

Fixes a-b-street#1157 by deduplicating all points (not just consecutive ones)
before creating movement polylines. Uses a 1cm epsilon tolerance
for floating point comparison to handle near-duplicate points.

Tested successfully:
- Cairo map imports without 'dupe non-adjacent pts' warnings
- Map loads and displays correctly in sandbox mode
- All map_model tests pass
@AlyZaki

AlyZaki commented May 16, 2026

Copy link
Copy Markdown

I hit this same panic importing Cairo urban core (~364K movements). I have a NaN-safe fallback fix ready — would a PR be welcome?

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.

importing cairo map

2 participants