itinero / OpenLR

A C# Implementation of the OpenLR specification using Itinero.
https://www.itinero.tech
Other
18 stars 12 forks source link

LineCoding on a single edge fails #84

Open hcoppen opened 6 years ago

hcoppen commented 6 years ago

BuildLine() fails with 'First edge does not match first vertex.' if coding is done on a single edge.

xivk commented 6 years ago

@hcoppen Could this be due to the edgeid-bug in Itinero I fixed recently? Can you given me a piece of code to reproduce or does it fail on any edge?

hcoppen commented 6 years ago

As fare as I know it fails on any single edge

dirkjot commented 3 years ago

I know this is an old issue, but it still seems to throw that error. I was able to encode some single edge openLRs, but others fail.

Fails:

            // sentier de l'esperance ,   2118 Luxembourg        
           var line = coder.BuildLine(new Itinero.LocalGeo.Coordinate(49.61307357599604f, 6.138820052146912f),
               new Itinero.LocalGeo.Coordinate(49.61323346501051f, 6.139544248580933f));

I tried this with the supplied pbf file and with a fresh file downloaded from geofabrik.

Works: This one is nearby and also one edge, but it works: CwRd4CNHXgonBgH2AIIKdRgL