OpenDataVisualizer/Schaad.OpenData.Traffic/Geometry/RoadSegment.cs
Claudio Schaad 8de869b023 Fix roundabout arm geometry for untargetable directions
Stations like "WEINFELDEN Kreisel West - Umfahrung" have directions
such as "zur Umfahrung" or "von Egelseestrasse" that cannot be
geocoded, so their dots were drawn on a nearby side road or around
the roundabout ring.

- Derive the roundabout centre from all stations sharing the name
  before " - " and point each arm outward from it
- Prefer road segments named like the station's address when
  following an arm; reject arms that don't get away from the centre
- Parse "zur", "zum", "Richtung" and "vom" direction prefixes
- Treat only swissTLM3D object kinds 12-19 as non-roads; kind 20 is
  a regular road (e.g. Dunantstrasse in Weinfelden)
- Bump the geometry cache to v7 so all stations are rebuilt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:50:48 +01:00

5 lines
212 B
C#

using Schaad.OpenData.Traffic.Models;
namespace Schaad.OpenData.Traffic.Geometry;
public sealed record RoadSegment(IReadOnlyList<GeoPoint> Points, bool IsMainRoad, bool IsDrivable = true, string? Name = null);