I'm trying to use linear referencing on a set of points of which the corresponding line ID is known.

The points are GPS measurements along a railway. Each measurement contains the ID of the railway that is measured. Since the GPS was not very accurate, most measurements are not placed on the railway but a few meters off, or even closer to another parallel railway. I want to reference the measurements to the railway that is predefined per GPS point, and not to the closest railway or line (which is default when using ArcGIS' Locate Features Along Routes tool).

Any suggestions on how to solve this?

I'm working with ArcMap 10.3.1 (Advanced license available). Preferred solution within ArcGIS, but QGIS is also fine.

2 Answers 2


According to ArcMap 10.3's manual for the Locate Features Along Routes tool, it is possible to enter a route identifier: (at step 7):

"Click the Route Identifier Field drop-down arrow and click the route identifier field."

I think it should be possible to reference your points on a particular line by first exporting your selected line and creating a new layer.

But I don't have a copy of ArcMap to test it.

With QGIS, you can use the Event layer plugin or the LRS plugin.

If you have PostGIS, you can also use its Linear Referencing functions in combination with ST_ClosestPoint.

  • You may not even need to export the route polylines as geoprocessing tools should honour am existing Selection.
    – Hornbydd
    Jun 14, 2016 at 13:12
  • Yes it's better if only the selected line features are taken into account. In the manual, they say that it's the case for the points layer but they don't say anything for the lines layer, and I don't have ArcMap any more to try it (I only had a Student license which is now expired).
    – thibautg
    Jun 14, 2016 at 13:16

Change the default behavior of the Locate Feature Along Route from Keep only the closest route location by unchecking that option so that the tool will locate any route within the search tolerance you set. Include all fields in the output. Make sure the output differentiates the name of Route ID of the lines from the field in the points that holds the Route ID values so that both are retained. Then simply select all RouteID values that match the Route values in your points and export them. You will have the event table you want.

You are not going to get a lot of routes if you set your tolerance to 50 meters or less and getting more than you want from this tool is faster than trying to get a match in to the exact route you want in a single step.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.