Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing road attributes with roads passing under another road (bridge) #372

Open
johnjore opened this issue Feb 7, 2024 · 0 comments
Open

Comments

@johnjore
Copy link

johnjore commented Feb 7, 2024

My use case is pretty simple, I just want the maxspeed attribute at various GPS positions, and for the most part it works, but not when one road goes over another (bridge)

This is such an intersection:

RouterPoint routerPoint = MainActivity.router.Resolve(MainActivity.profile, new Coordinate(-37.81538102061581f, 144.8083309966932f));
Itinero.Data.Network.RoutingEdge edge = MainActivity.routerDb.Network.GetEdge(routerPoint.EdgeId);
IAttributeCollection attributes = MainActivity.routerDb.GetProfileAndMeta(edge.Data.Profile, edge.Data.MetaId);

attributes here has 5 values, all relating to Western Ring Road, nothing for Boundary Road. If I query the GPS position using openstreetmap.org, it has "Bridge" and "Primary Road" for the two roads, both with maxspeed attributes set.

pbf file, https://download.geofabrik.de/australia-oceania-latest.osm.pbf, was converted to as per the samples:

            using (var stream1 = new FileInfo(@"c:\data\australia-latest.osm.pbf").OpenRead())
            {
                routerDb.LoadOsmData(stream1, Itinero.Osm.Vehicles.Vehicle.Car);
            }
            using (var stream2 = new FileInfo(@"c:\data\australia.db").Open(FileMode.Create))
            {
                routerDb.Serialize(stream2);
            }

Is this a limitation of the library or something I am doing wrong? Or?

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

No branches or pull requests

1 participant