As I explained in Snap points to line and calculate chainage using Open source GIS the QGIS LRS plugin accepts points not lying on the line to calibrate it, so it's not a problem that your points are not on the line. By the way, I assume you already loaded the txt file as a point layer (say gps_layer
).
As you may have already read, you first need to calibrate your route. Such calibration enables you to calculate measures on your route.
I will try to explain once more the parameters you need to calibrate your route based on a couple (start and end) of points. You can create such couple of points digitizing the start and end nodes of the route and saving it to a calibration
layer which also contains the measures you assign to each point. For instance, start point would have a measure of 0 and your end point would have a measure of 10000 (if your route is 10Km long).
Once you do that, you will use both the route layer and the calibration
layer, this way:
Lines layer: The input line layer which contains your route (This would be the layer you obtained after exporting from the KML file).
Lines route field: This is a field on the route layer whose value specifies an ID for the route (say 'route1').
Points layer: The calibration layer with the couple of points (start and end nodes) you created.
Points route field: This is a field in the calibration (point) layer whose value matches the ID of the route (we said 'route1').
Measure field: The field name of the measure you set for your points (remember you set 0 for the start point and 10000 for your end point).
Measure unit: I've used meters
in the example.
Once your route is calibrated, you can use the Measures
tab in the plugin GUI and load your gps_layer
, you find how to use such functionality in my answer to How to find Chainage of points using QGIS (Numeral 2.)
I hope it's clear now. If it's not, try to ask something more specific (after a first try from your side).