I am using leaflet, for routing transit GeoJSON routes, and one thing I've noticed is that often, in major routes polylines are divided into two separate Inbound and Outbound routes, parallel ways - one way for each direction. This behavior is not desirable for the particular program I'm writing, so I want parallel ways to be merged into a single way running down the center of the street. It seems like a fairly simple problem, but I'm having a trouble getting the program to identify ways that need to be merged and then merge them properly.
I am using leaflet, for routing transit GeoJSON routes, and one thing I've noticed is that often, in major routes polylines are divided into two separate Inbound and Outbound routes, parallel ways - one way for each direction. This behavior is not desirable for the particular program I'm writing, so I want parallel ways to be merged into a single way running down the center of the street. It seems like a fairly simple problem, but I'm having a trouble getting the program to identify ways that need to be merged and then merge them properly.