Closed sadaqatbukhari closed 8 years ago
You need to implement a custom vehicle class:
https://github.com/OsmSharp/OsmSharp/blob/master/OsmSharp.Routing/Vehicles/MotorVehicle.cs
And add a new routing interpreter that supports railways:
Hi, Thanks,
I have created new class for "RailWay : MotorVehicle" it is inherited from MotorVehicle.
AccessibleTags.Add("funicular", string.Empty); AccessibleTags.Add("light_rail", string.Empty); AccessibleTags.Add("miniature", string.Empty); AccessibleTags.Add("monorail", string.Empty); AccessibleTags.Add("narrow_gauge", string.Empty); AccessibleTags.Add("preserved", string.Empty); AccessibleTags.Add("railway", string.Empty); AccessibleTags.Add("subway", string.Empty); AccessibleTags.Add("tram", string.Empty); AccessibleTags.Add("station", string.Empty); AccessibleTags.Add("rail", string.Empty);
VehicleTypes.Add("train"); // ... and also a generic motor vehicle.
VehicleTypes.Add("railway"); // a motor vehicle is a generic vehicle.
VehicleTypes.Add("train"); // ... and also a generic motor vehicle.
VehicleTypes.Add("rail");
VehicleTypes.Add("tram");
I have added railway in this function private void FillRelevantTags()
{
_relevantRoutingKeys = new HashSet
Thanks, Sadaqat
Anyone found a solution to this problem yet?
For those who also want this, I created a small example here:
Hi, I don't know is it right or wrong place to ask this question...
I need to route rail instead of car or bus, could you please guide me how to add that Rail or PVS support in OSM.
Regards, Sadaqat