I have a Linear Referencing Route System in ArcGIS Geodatabase format (polylines with M values) and a separate polyline feature class of short segments (called TMC) that do not have RouteIds currently. The Linear Referencing Routes are directional. So, there will be two long lines on top each other in most locations in the Route layer where there are two-way routes, with RouteIds like 1001 and 1002 and these are digitized in opposite directions. How can I assign the appropriate RouteIds to the TMC segment layer based on the digitized direction of the TMC segments? I only need to assign RouteIds when the TMC is approximately parallel to an existing Route and within 100 ft of the Route? We need to ignore the TMCs which do not meet these criteria. So, if a TMC segment intersects a Route, but is perpendicular to it, it should not be assigned a RouteId. Thanks.
One way to do this would be to create a topology that includes both the TMC's and the road centerlines. I'd start with a small cluster tolerance and use a must-be-covered-by rule to find places where TMC's are not near roads.
I would then write a program that creates a dictionary where the key is the oid of the TMC and the value is a list of road-centerline oids that fall along the TMC. Populate it by looping through each TMC and find each topology element that it belongs to.
Once you've got the dictionary you could loop through each TMC and assign it a route-id by looking up the route feature by oid. If performance is critical another dictionary of associating route centerline oids to route ids could be used.
I think the keyword here is "approximately parallel". So my program would first find the parallel TMCs to each route i.e.
Once you do that you can then move on to the splitting: